On 09/06/2009 02:11 AM, Erez Zilber wrote: > On Thu, Sep 3, 2009 at 8:02 PM, Mike Christie<micha...@cs.wisc.edu> wrote: >> On 09/03/2009 11:21 AM, Erez Zilber wrote: >>> Fix compilation warnings and modify the Makefiles to treat >>> warnings as errors. >>> >>> Signed-off-by: Erez Zilber<erezzi.l...@gmail.com> >>> >> >> Thanks. >> >> >> I get this compilation error on fedora 10. We used to get a warning about it >> not being initialized and upstream we did this patch. Is this just a bug in >> my compiler? >> >> >> @@ -693,6 +692,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, >> unsigned int target_id) >> "Too many iscsi targets. >> Max " >> "number of targets is >> %d.\n", >> ISCSI_MAX_TARGET - 1); >> + err = -EOVERFLOW; >> goto release_host; >> } >> } >> >> >> make >> make -C /lib/modules/2.6.29.4-167.fc11.x86_64/build M=`pwd` KBUILD_OUTPUT= >> V=0 modules >> make[1]: Entering directory `/usr/src/kernels/2.6.29.4-167.fc11.x86_64' >> CC [M] >> /home/mnc/kernel/iscsi/open-iscsi/devel/open-iscsi/kernel/scsi_transport_iscsi.o >> cc1: warnings being treated as errors >> /home/mnc/kernel/iscsi/open-iscsi/devel/open-iscsi/kernel/scsi_transport_iscsi.c: >> In function ‘iscsi_add_session’: >> /home/mnc/kernel/iscsi/open-iscsi/devel/open-iscsi/kernel/scsi_transport_iscsi.c:678: >> error: ‘err’ may be used uninitialized in this function >> make[2]: *** >> [/home/mnc/kernel/iscsi/open-iscsi/devel/open-iscsi/kernel/scsi_transport_iscsi.o] >> Error 1 >> make[1]: *** >> [_module_/home/mnc/kernel/iscsi/open-iscsi/devel/open-iscsi/kernel] Error 2 >> make[1]: Leaving directory `/usr/src/kernels/2.6.29.4-167.fc11.x86_64' > > Yeah, this looks strange because err should have been initialized in > the for loop (assuming that ISCSI_MAX_TARGET> 0). Maybe the compiler > doesn't check that (which may be considered a bug/feature ;) ). Do you > want to add this fix also to open-iscsi.git? >
I messed up. I thought we already had the fix, so I was wondering why I get the compilation error with your patch. I mean I thought your patch added a new failure somehow. Ignore me :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to open-iscsi@googlegroups.com To unsubscribe from this group, send email to open-iscsi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/open-iscsi -~----------~----~----~----~------~----~------~--~---