]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: fix gcc-7 warning -Wint-in-bool-context
authorRuediger Meier <ruediger.meier@ga-group.nl>
Sun, 11 Jun 2017 23:59:36 +0000 (01:59 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 14 Jun 2017 09:48:22 +0000 (11:48 +0200)
commit11e904f02cb1ec4e17e71b9925f35d5f7786e5fe
treeebeb6d742dd5226f9604223bf16a00f11f626f75
parentacecab61e575d0729356f1ae2d78642d0c0bccc3
libblkid: fix gcc-7 warning -Wint-in-bool-context

BLOCK_SIZE(sb) should be unsigned so that the left shift is defined.

This was the warning:

../libblkid/src/superblocks/exfat.c: In function 'probe_exfat':
../libblkid/src/superblocks/exfat.c:40:42: warning: '<<' in boolean context, did you mean '<' ? [-Wint-in-bool-context]
 #define CLUSTER_SIZE(sb) (BLOCK_SIZE(sb) << (sb)->bpc_bits)
                          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../libblkid/src/superblocks/exfat.c:122:14: note: in expansion of macro 'CLUSTER_SIZE'
  if (!sb || !CLUSTER_SIZE(sb))
              ^~~~~~~~~~~~

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
libblkid/src/superblocks/exfat.c