lkml.org 
[lkml]   [2008]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] 8250: Eliminate compile warning of 8250.c
Date
On Tuesday 25 November 2008 18:43:34 Alan Cox wrote:
> > Can't understand initializing got "risk hiding future ones". As I know,
> > didn't
>
> Because if you set it to NULL and later delete a line which does the
> intended assignment you will no longer get a warning.
>
> > think BUG_ON(n==null) cover this. And I don't think leave it to compiler
> > is more proper here.
>
> The BUG_ON covers it, the current gcc gets this right and works it out.
>
> NAK again

The logic here is strange...

If you used old compiler, you would get a warning, and you thought that's
ensured we won't delete a intended assignment by mistake.

If you used new compiler, you wouldn't get a warning, and you think this time
the compiler get it right.

So, what result did you expect? A warning to notice that we didn't delete a
intended assignment, or a "right" result?

OK. if you worry about "delete a line which does the intended assignment", the
updated version with BUG_ON(i == NULL) can help.

--
regards
Yang, Sheng



\
 
 \ /
  Last update: 2008-11-25 11:57    [from the cache]
©2003-2011 Jasper Spaans