From: Marin Mitov <mitov@issp.bas.bg>
To: Jeff Garzik <jeff@garzik.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH]Silencing warning: 'host' may be used uninitialized in this function
Date: Fri, 10 Apr 2009 02:31:32 +0300 [thread overview]
Message-ID: <200904100231.32307.mitov@issp.bas.bg> (raw)
In-Reply-To: <49DE78E4.2060201@garzik.org>
On Friday 10 April 2009 01:38:28 am Jeff Garzik wrote:
> Marin Mitov wrote:
> > Hi all,
> >
> > I do not know if that is worth the effort, but...
> >
> > Silencing: warning: 'host' may be used uninitialized in this function
> > It is a false positive.
> >
> > The patch is against 2.6.30-rc1, but should apply to 2.6.29(.1) too.
> >
> > Signed-off-by: Marin Mitov mitov@issp.bas.bg
> > ================================================
> > --- a/drivers/ata/sata_via.c 2009-04-05 22:59:26.000000000 +0300
> > +++ b/drivers/ata/sata_via.c 2009-04-06 00:07:25.000000000 +0300
> > @@ -566,7 +566,7 @@
> > static int printed_version;
> > unsigned int i;
> > int rc;
> > - struct ata_host *host;
> > + struct ata_host *host = host;
> > int board_id = (int) ent->driver_data;
> > const unsigned *bar_sizes;
>
> we use the uninitialized_var() macro for false positives.
>
> Jeff
>
Well, changed and resubmitted.
Marin Mitov
Silencing: " warning: 'host' may be used uninitialized in this function"
The patch is against 2.6.30-rc1, but should apply to 2.6.29(.1) too.
Signed-off-by: Marin Mitov mitov@issp.bas.bg
================================================
--- a/drivers/ata/sata_via.c 2009-04-05 22:59:26.000000000 +0300
+++ b/drivers/ata/sata_via.c 2009-04-06 00:07:25.000000000 +0300
@@ -566,7 +566,7 @@
static int printed_version;
unsigned int i;
int rc;
- struct ata_host *host;
+ struct ata_host *uninitialized_var(host);
int board_id = (int) ent->driver_data;
const unsigned *bar_sizes;
next prev parent reply other threads:[~2009-04-09 23:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 22:33 [PATCH]Silencing warning: 'host' may be used uninitialized in this function Marin Mitov
2009-04-09 22:38 ` Jeff Garzik
2009-04-09 23:31 ` Marin Mitov [this message]
2009-04-13 8:11 ` Jeff Garzik
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=200904100231.32307.mitov@issp.bas.bg \
--to=mitov@issp.bas.bg \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.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