Whamcloud - gitweb
Fix clang warnings on architectures with a 64-bit long
authorTheodore Ts'o <tytso@mit.edu>
Thu, 11 Feb 2021 15:55:21 +0000 (10:55 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Feb 2021 15:55:21 +0000 (10:55 -0500)
commit33b9a60c366da5df92d9c1b003aedaf1d0e2008a
treeaade9700c6078483cb10e400114ceb889c29f666
parentfb874e6ff42bee3ee327afc2651483b83311b445
Fix clang warnings on architectures with a 64-bit long

On most systems where we compile e2fsprogs, the u64 type is an
unsigned long long.  However, there are platforms (such as the
PowerPC) where a long 64-bits and so u64 is typedef'ed to be unsigned
long instead of a unsigned long long.  Fix this by using explicit
casts in printf statements.  For scanf calls, we need to receive the
value into a unsigned long long, and then assign it to a u64, after
doing range checks.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
44 files changed:
debugfs/debugfs.c
debugfs/extent_inode.c
debugfs/filefrag.c
debugfs/htree.c
debugfs/icheck.c
debugfs/logdump.c
debugfs/ls.c
debugfs/lsdel.c
debugfs/unused.c
debugfs/zap.c
e2fsck/badblocks.c
e2fsck/ea_refcount.c
e2fsck/message.c
e2fsck/pass1.c
e2fsck/pass1b.c
e2fsck/problem.c
e2fsck/region.c
e2fsck/unix.c
e2fsck/util.c
lib/e2p/ls.c
lib/ext2fs/blkmap64_ba.c
lib/ext2fs/blkmap64_rb.c
lib/ext2fs/gen_bitmap64.c
lib/ext2fs/progress.c
lib/ext2fs/read_bb_file.c
lib/ext2fs/tst_bitmaps.c
lib/ext2fs/tst_iscan.c
lib/ext2fs/tst_libext2fs.c
lib/support/quotaio_v2.c
misc/badblocks.c
misc/dumpe2fs.c
misc/e2freefrag.c
misc/e2image.c
misc/e2undo.c
misc/e4defrag.c
misc/filefrag.c
misc/mk_hugefiles.c
misc/mke2fs.c
misc/tune2fs.c
resize/extent.c
resize/main.c
resize/online.c
resize/resize2fs.c
resize/test_extent.c