Re: [PATCH] drivers/ide/ide-probe.c: uninitialized variable 'rc'

From: Elias Oltmanns
Date: Wed Sep 10 2008 - 18:40:57 EST

"Steven Noonan" <steven@xxxxxxxxxxxxxx> wrote:
> On Wed, Sep 10, 2008 at 2:09 PM, Bartlomiej Zolnierkiewicz
> <bzolnier@xxxxxxxxx> wrote:
>> I recall seeing identical patch before:
>> Does the existing code really results in gcc warning?
> Yes, because GCC thinks it's possible that the for loop has zero
> iterations (and hence, 'rc' is never touched).

What about changing the declaration to

int i, uninitialized_var(rc);



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at