Buried in warnings
Buried in warnings
Posted Nov 2, 2006 16:58 UTC (Thu) by nevyn (guest, #33129)In reply to: Buried in warnings by viro
Parent article: Buried in warnings
You are saying that the uninitialized vars aren't hidden, but this entire article proves otherwise. There are so many warnings when you compile the kernel that noone is looking at the ones that are being output.
Personally I think there is a huge amount of middle ground, for instance the example code Joe posted could declare the pointer as NULL allocate to it in the if and then just check if the pointer is not NULL later on (Ie. pointer also takes on the job of the seperate boolean).
Finally with decent usage of ASSERT/nonnull you can _very_ easily detect when pointers are still NULL from declaration time.
