uninit variable warnings on gcc 11.3?

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

 



Hi everyone,

I went on a spree of trying to build things with W=12e this afternoon,
and I noticed that gcc spat out the following warnings.  I can't tell if
these warnings are bogus noise or if they actually could cause problems,
particularly in the extent status tree bits.  That said, IIRC there's
been some mention of weirdness wrt that part of ext4, so I thought I
should mention this in case it's significant to anyone.

--D

In file included from /storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:33:
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c: In function ‘ext4_ext_map_blocks’:
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/ext4_extents.h:230:15: warning: ‘zero_ex2.ee_start_lo’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  230 |         block = le32_to_cpu(ex->ee_start_lo);
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:3426:38: note: ‘zero_ex2.ee_start_lo’ was declared here
 3426 |         struct ext4_extent zero_ex1, zero_ex2;
      |                                      ^~~~~~~~
In file included from /storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:33:
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/ext4_extents.h:231:19: warning: ‘zero_ex2.ee_start_hi’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  231 |         block |= ((ext4_fsblk_t) le16_to_cpu(ex->ee_start_hi) << 31) << 1;
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:3426:38: note: ‘zero_ex2.ee_start_hi’ was declared here
 3426 |         struct ext4_extent zero_ex1, zero_ex2;
      |                                      ^~~~~~~~
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:3140:16: warning: ‘zero_ex2.ee_block’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 3140 |         return ext4_es_insert_extent(inode, ee_block, ee_len, ee_pblock,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3141 |                                      EXTENT_STATUS_WRITTEN);
      |                                      ~~~~~~~~~~~~~~~~~~~~~~
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:3426:38: note: ‘zero_ex2.ee_block’ was declared here
 3426 |         struct ext4_extent zero_ex1, zero_ex2;
      |                                      ^~~~~~~~
In file included from /storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:33:
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/ext4_extents.h:230:15: warning: ‘zero_ex1.ee_start_lo’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  230 |         block = le32_to_cpu(ex->ee_start_lo);
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:3426:28: note: ‘zero_ex1.ee_start_lo’ was declared here
 3426 |         struct ext4_extent zero_ex1, zero_ex2;
      |                            ^~~~~~~~
In file included from /storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:33:
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/ext4_extents.h:231:19: warning: ‘zero_ex1.ee_start_hi’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  231 |         block |= ((ext4_fsblk_t) le16_to_cpu(ex->ee_start_hi) << 31) << 1;
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:3426:28: note: ‘zero_ex1.ee_start_hi’ was declared here
 3426 |         struct ext4_extent zero_ex1, zero_ex2;
      |                            ^~~~~~~~
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:3140:16: warning: ‘zero_ex1.ee_block’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 3140 |         return ext4_es_insert_extent(inode, ee_block, ee_len, ee_pblock,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3141 |                                      EXTENT_STATUS_WRITTEN);
      |                                      ~~~~~~~~~~~~~~~~~~~~~~
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/extents.c:3426:28: note: ‘zero_ex1.ee_block’ was declared here
 3426 |         struct ext4_extent zero_ex1, zero_ex2;
      |                            ^~~~~~~~
  CC [M]  fs/ext4/inode.o
  CC [M]  fs/ext4/ioctl.o
  CC [M]  fs/ext4/mballoc.o
  CC [M]  fs/ext4/migrate.o
  CC [M]  fs/ext4/mmp.o
  CC [M]  fs/ext4/move_extent.o
  CC [M]  fs/ext4/namei.o
  CC [M]  fs/ext4/readpage.o
  CC [M]  fs/ext4/page-io.o
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/inode.c: In function ‘ext4_page_mkwrite’:
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/inode.c:6205:23: warning: ‘get_block’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 6205 |                 err = block_page_mkwrite(vma, vmf, get_block);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  fs/ext4/resize.o
  CC [M]  fs/ext4/super.o
  CC [M]  fs/ext4/symlink.o
  CC [M]  fs/ext4/sysfs.o
  CC [M]  fs/ext4/xattr.o
  CC [M]  fs/ext4/xattr_hurd.o
  CC [M]  fs/ext4/xattr_trusted.o
  CC [M]  fs/ext4/xattr_user.o
  CC [M]  fs/ext4/fast_commit.o
  CC [M]  fs/ext4/orphan.o
  CC [M]  fs/ext4/acl.o
  CC [M]  fs/ext4/xattr_security.o
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/super.c: In function ‘ext4_fill_super’:
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/super.c:5486:15: warning: ‘first_not_zeroed’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 5486 |         err = ext4_register_li_request(sb, first_not_zeroed);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/super.c:5042:22: note: ‘first_not_zeroed’ was declared here
 5042 |         ext4_group_t first_not_zeroed;
      |                      ^~~~~~~~~~~~~~~~
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/super.c:3253:46: warning: ‘logical_sb_block’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 3253 |                 if (block_bitmap >= sb_block + 1 &&
      |                                     ~~~~~~~~~^~~
/storage/home/djwong/cdev/work/linux-xfs/fs/ext4/super.c:5036:22: note: ‘logical_sb_block’ was declared here
 5036 |         ext4_fsblk_t logical_sb_block;
      |                      ^~~~~~~~~~~~~~~~



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux