[PATCH] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
Artem Bityutskiy
dedekind1 at gmail.com
Tue Apr 12 04:25:44 EDT 2011
On Mon, 2011-04-11 at 14:50 -0700, maksim.rayskiy at gmail.com wrote:
> From: Maksim Rayskiy <maksim.rayskiy at gmail.com>
>
> When compiling UBIFS with CONFIG_UBIFS_FS_DEBUG not set,
> gcc-4.5.2 generates a slew of "warning: statement with no effect"
> on references to non-void functions defined as 0.
> To avoid these warnings, change appropriate definitions from
> #define dbg_xxx(a) 0
> to
> #define dbg_xxx(a) ({0; })
Hi, thanks for the fix, but I agree that something like
static inline int dbg_xxx(a) { return 0; }
would be cleaner. Would you mind trying that approach and sending a
patch?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list