Skip to content

Commit

Permalink
ext4: address a benign compiler warning
Browse files Browse the repository at this point in the history
When !defined(CONFIG_EXT4_DEBUG), mb_debug() should be defined as a
no_printk() statement instead of an empty statement in order to suppress
the following compiler warning:

fs/ext4/mballoc.c: In function ‘ext4_mb_cleanup_pa’:
fs/ext4/mballoc.c:2659:47: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
   mb_debug(1, "mballoc: %u PAs left\n", count);

Signed-off-by: Patrick Palka <patrick@parcs.ath.cx>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Patrick Palka authored and Theodore Ts'o committed Feb 18, 2014
1 parent 7747e6d commit 024949e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/mballoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extern ushort ext4_mballoc_debug;
} \
} while (0)
#else
#define mb_debug(n, fmt, a...)
#define mb_debug(n, fmt, a...) no_printk(fmt, ## a)
#endif

#define EXT4_MB_HISTORY_ALLOC 1 /* allocation */
Expand Down

0 comments on commit 024949e

Please sign in to comment.