lkml.org 
[lkml]   [2012]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2012-10-27 21:21    [W:0.073 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site