Whamcloud - gitweb
misc: replace comparison macros with inline functions
Replace the EXT2FS_RB_EMPTY_ROOT(), EXT2FS_RB_EMPTY_NODE(),
EXT2FS_RB_CLEAR_NODE(), IS_BLOCK_BM(), IS_INODE_BM(), and
IS_INODE_TB() macros with static inline functions to avoid
suprious compiler warnings with clang:
pass1.c:618:28: warning: equality comparison with extraneous
parentheses [-Wparentheses-equality]
if ((*((__u32 *)(entry)) == 0UL)) {
~~~~~~~~~~~~~~~~~~~~^~~~~~
pass1.c:618:28: note: remove extraneous parentheses
around the comparison to silence this warning
if ((*((__u32 *)(entry)) == 0UL)) {
^~
pass1.c:618:28: note: use '=' to turn this equality
comparison into an assignment
if ((*((__u32 *)(entry)) == 0UL)) {
^~
=
The static inline functions should compile identically, and allow
some extra compile-time checking for the arguments over macros.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>