Re: [PATCH -tip][SCSI] scsi: scsi_transport_iscsi.c initialize thevariable before it get used

From: James Bottomley
Date: Tue May 26 2009 - 11:28:41 EST

On Tue, 2009-05-26 at 20:49 +0530, Jaswinder Singh Rajput wrote:
> I am watching this problem from long time in -tip.
> Subject: [PATCH] scsi: scsi_transport_iscsi.c initialize the variable before it get used
> In some cases, err will be used uninitialized.

What cases? A simple theoretical analysis shows that this variable is
always set.

> CC drivers/scsi/scsi_transport_iscsi.o
> drivers/scsi/scsi_transport_iscsi.c: In function âiscsi_add_sessionâ:
> drivers/scsi/scsi_transport_iscsi.c:678: warning: âerrâ may be used
> uninitialized in this function

My version of gcc (4.3.3) correctly sees that the variable cannot be
uninitialised ... what version are you using?

If it's a popular version, we can always do the uninitialised_var()
thing, but if it's just a non-standard compiler, I'd rather not mess up
the source code to please gcc.


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