mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
To: Mark Hindley <mark@hindley.org.uk>
Cc: Satyam Sharma <satyam@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Netdev Mailing List <netdev@vger.kernel.org>,
	Jeff Garzik <jeff@garzik.org>
Subject: Re: [PATCH -mm 1/2] 3c59x: Fix uninitialized variable bug
Date: Tue, 4 Sep 2007 11:17:57 +0200	[thread overview]
Message-ID: <20070904091757.GC4241@newton.mathematik.tu-chemnitz.de> (raw)
In-Reply-To: <20070904085331.GH5944@hindley.org.uk>

On Tue, Sep 04, 2007 at 09:53:31AM +0100, Mark Hindley wrote:
> On Tue, Sep 04, 2007 at 02:09:47PM +0530, Satyam Sharma wrote:
> > Hi Steffen,
> > 
> > 
> > On Tue, 4 Sep 2007, Steffen Klassert wrote:
> > 
> > > On Tue, Sep 04, 2007 at 03:45:55AM +0530, Satyam Sharma wrote:
> > > > 
> > > > drivers/net/3c59x.c: In function 'vortex_up':
> > > > drivers/net/3c59x.c:1495: warning: 'err' may be used uninitialized in this function
> > > 
> > > This came in with the recently applied 3c59x-check-return-of-pci_enable_device patch
> > > from Mark Hindley. I just compiled it on a PCI only machine so far, therefore I did
> > > not notice the warning yet.
> > 
> > Hmm, the .config I built with had PCI=y as well. Probably a compiler
> > version difference -- Jeff also mentioned yesterday that some newer
> > GCC versions fail to warn about uninitialized variables cases.
> > 
> 
> Sorry, this is my bad. I have just checked: there is no warning with gcc
> 4.2 or 4.1, but 3.3 emits the warning. 
> 

The only warning that I was able to trigger with gcc 4.2 is in the case of a .config
without PCI support. In this case I get

drivers/net/3c59x.c: In function 'vortex_up':
drivers/net/3c59x.c:1672: warning: 'err' is used uninitialized in this function
                                         ^^
So we have to be more carefull with the newer gcc versions.

Steffen


  reply	other threads:[~2007-09-04  9:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LFD.0.999.0709040340250.8504@enigma.security.iitk.ac.in >
2007-09-03 22:15 ` Satyam Sharma
2007-09-03 22:22   ` [PATCH -mm 2/2] 3c59x MAINTAINERS Satyam Sharma
2007-09-04  7:55     ` Steffen Klassert
2007-09-04  8:16   ` [PATCH -mm 1/2] 3c59x: Fix uninitialized variable bug Steffen Klassert
2007-09-04  8:39     ` Satyam Sharma
2007-09-04  8:53     ` Mark Hindley
2007-09-04  9:17       ` Steffen Klassert [this message]
2007-09-04  9:35       ` Mark Hindley
2007-09-04  9:39         ` Steffen Klassert
2007-09-06  9:55       ` Satyam Sharma
2007-09-06 21:40       ` Mark Hindley

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=20070904091757.GC4241@newton.mathematik.tu-chemnitz.de \
    --to=klassert@mathematik.tu-chemnitz.de \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@hindley.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=satyam@infradead.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®