Re: [scsi:misc 34/37] include/uapi/linux/swab.h:106:23: warning: 'csum' may be used uninitialized in this function

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

 



On Tue, 2013-07-09 at 17:38 +0800, kbuild test robot wrote:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
> head:   06ba9fa7f8cec5b9c04e511bfe21c5aa7cc3044c
> commit: eb7b211bac8e0aad45c2349a853be13cef20048a [34/37] [SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write
> config: x86_64-randconfig-x027-0707 (attached as .config)
> 
> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
> 
> All warnings:
> 
>    In file included from include/linux/swab.h:4:0,
>                     from include/uapi/linux/byteorder/little_endian.h:12,
>                     from include/linux/byteorder/little_endian.h:4,
>                     from arch/x86/include/uapi/asm/byteorder.h:4,
>                     from include/asm-generic/bitops/le.h:5,
>                     from arch/x86/include/asm/bitops.h:516,
>                     from include/linux/bitops.h:22,
>                     from include/linux/kernel.h:10,
>                     from include/linux/cache.h:4,
>                     from include/linux/time.h:4,
>                     from include/linux/stat.h:18,
>                     from include/linux/module.h:10,
>                     from drivers/scsi/scsi_debug.c:28:
>    drivers/scsi/scsi_debug.c: In function 'dif_verify':
> >> include/uapi/linux/swab.h:106:23: warning: 'csum' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      (__builtin_constant_p((__u16)(x)) ? \
>                           ^
>    drivers/scsi/scsi_debug.c:1715:6: note: 'csum' was declared here
>      u16 csum;
>          ^

This is probably because the randconfig has CONFIG_BUG=n, so the default
case is a nop.  The original had an initialiser in there, so the fix is
either to drop the impossible default case or add the initialiser.

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