Messages in this thread | | | Date | Sat, 27 Oct 2012 11:48:36 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] Remove uninitialized_var() |
| |
On Sat, 27 Oct 2012 15:12:03 +0200 Ingo Molnar <mingo@kernel.org> wrote:
> There's 3 types of conversions done: > > uninitialized_var(x) => x = 0 /* for scalar types */ > uninitialized_var(x) => x = NULL /* for pointers */ > uninitialized_var(x) => x = { } /* for structures, unions */
It's regrettable that we lose information. uninitialized_var() says "this isn't needed - it's just there for gcc". The reader can of course work out the reason with careful code inspection, but that's a lot more time consuming.
We could go add "/* keep gcc quiet */" to every site, or add self-documenting macros for the above.
| |