lkml.org 
[lkml]   [2009]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -tip][SCSI] scsi: scsi_transport_iscsi.c initialize the variable before it get used
From
Date
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.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-05-26 17:31    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site