Whamcloud - gitweb
Fix warnings found using UBSAN
authorTheodore Ts'o <tytso@mit.edu>
Tue, 4 Jul 2017 22:00:46 +0000 (18:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 4 Jul 2017 22:00:46 +0000 (18:00 -0400)
commitc8ca23979fa75df15208922422e81c83cf112320
tree13ff731615123360b3089a4e7d8608254c9cea3a
parentb3d7751cd1bf429cb3b0060f12ac13e9827b9e88
Fix warnings found using UBSAN

Compiling with -fsanitize=undefined -fsanitize=address causes some
warnings of C code that has undefined behavior according to the C
standard bugs.  None of the warnings should cause e2fsprogs
malfunction given a sane compiler running on architectures that Linux
can support.  Still, it's better to clean up to code than not.

To fix up a complaint of a negative shift in hash function, update the
very dated hash we had been using for the revoke table with the
current generic hash used by the kernel.

Other fixes are fairly self-explanatory.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/jfs_user.h
e2fsck/pass1.c
e2fsck/recovery.c
e2fsck/revoke.c
lib/ext2fs/block.c
lib/ext2fs/inode.c