[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200811251851.44768.sheng@linux.intel.com>
Date: Tue, 25 Nov 2008 18:51:44 +0800
From: Sheng Yang <sheng@...ux.intel.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH] 8250: Eliminate compile warning of 8250.c
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists