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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux