lkml.org 
[lkml]   [2008]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] drivers/ide/ide-probe.c: uninitialized variable 'rc'
Date
On Saturday 27 September 2008, Bartlomiej Zolnierkiewicz wrote:
> On Thursday 11 September 2008, Steven Noonan wrote:
> > On Wed, Sep 10, 2008 at 3:40 PM, Elias Oltmanns <eo@nebensachen.de> wrote:
> > >
> > > What about changing the declaration to
> > >
> > > int i, uninitialized_var(rc);
> > >
> > > then?
> > >
> >
> > That's probably a -much- better idea. I'm an utter newbie to kernel
> > development, so I wasn't aware of that feature.
>
> Did I miss the final patch version?
>
> [ Could you please re-send and/or re-cast it? ]

Oh, well...

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: workaround for bogus gcc warning in ide_sysfs_register_port()

Reported-by: "Steven Noonan" <steven@uplinklabs.net>
Suggested-by: "Elias Oltmanns" <eo@nebensachen.de>
Cc: mingo@elte.hu
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/ide/ide-probe.c
===================================================================
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1492,7 +1492,7 @@ static struct device_attribute *ide_port

static int ide_sysfs_register_port(ide_hwif_t *hwif)
{
- int i, rc;
+ int i, uninitialized_var(rc);

for (i = 0; ide_port_attrs[i]; i++) {
rc = device_create_file(hwif->portdev, ide_port_attrs[i]);

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