lkml.org 
[lkml]   [2008]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers/serial/8250.c: 'i' may be used uninitialized

* Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> On Wed, 1 Oct 2008 01:47:07 -0700
> Steven Noonan <steven@uplinklabs.net> wrote:
>
> > serial_unlink_irq_chain() does not initialize iterator 'i', and that is
> > correct logically because it is always initialized, either in the
> > hlist_for_each or in the conditional immediately after (which fires if
> > hlist_for_each comes up empty-handed). GCC does not realize this
> > connection and emits a false warning. Annotate it with uninitialized_var().
> >
> > Signed-off-by: Steven Noonan <steven@uplinklabs.net>
>
> Ok definitive NAK. gcc 4.3.0 can work this out and doesn't produce a
> warning. Thanks for sending the patch though (and to the gcc folks for
> rendering it unnecessary)

thanks for sorting it out! A CONFIG_CC_DISABLE_WARNING_ANNOTATIONS=y
might be useful as well, which could be used periodically (by gcc folks)
to check which warnings are hidden by annotations?

Ingo


\
 
 \ /
  Last update: 2008-10-02 11:05    [W:0.264 / U:2.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site