LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Lee Revell <rlrevell@joe-job.com>
Cc: "Toralf Förster" <toralf.foerster@gmx.de>,
	andrea@suse.de, viro@zeniv.linux.org.uk,
	linux-kernel@vger.kernel.org
Subject: Re: fs/block_dev.c:953: warning: 'found' might be used uninitialized in this function
Date: Fri, 30 Mar 2007 21:40:11 +0200	[thread overview]
Message-ID: <20070330194011.GK14134@stusta.de> (raw)
In-Reply-To: <75b66ecd0703280956i522cf6cbyc4c9ef8b1666ec15@mail.gmail.com>

On Wed, Mar 28, 2007 at 12:56:59PM -0400, Lee Revell wrote:
> On 3/28/07, Toralf Förster <toralf.foerster@gmx.de> wrote:
> >I compiled current git source 2.6.21-rc5-g28defbe and got this warning:
> >...
> >fs/block_dev.c: In function `bd_claim_by_kobject':
> >fs/block_dev.c:953: warning: 'found' might be used uninitialized in this 
> >function
> >...
> >
> 
> Most of these warnings are really GCC bugs.  Please examine the code
> in question.

The word "GCC bugs" is a bit hard for them.

gcc gives different warnings for code where it could prove that a 
variable gets used uninitialized and code where it's not sure whether a 
variable will always be used initialized.

There are even cases where it's technically impossible for gcc to 
determine that a variable always gets initialized.

And these "might be used uninitialized" warnings have already found 
several kernel bugs.

> Lee

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


      parent reply	other threads:[~2007-03-30 19:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-28 16:47 Toralf Förster
2007-03-28 16:56 ` Lee Revell
2007-03-28 17:23   ` Jiri Kosina
2007-03-28 20:14     ` Andrew Morton
2007-03-28 21:59       ` Dan Aloni
2007-03-30  3:16       ` Kyle Moffett
2007-03-30 19:47         ` Adrian Bunk
2007-03-31  3:09           ` Cong WANG
2007-03-31  8:11           ` Toralf Förster
2007-03-31 14:04             ` Adrian Bunk
2007-03-30 19:40   ` Adrian Bunk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070330194011.GK14134@stusta.de \
    --to=bunk@stusta.de \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    --cc=toralf.foerster@gmx.de \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: fs/block_dev.c:953: warning: '\''found'\'' might be used uninitialized in this function' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).