[PATCH] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS

Mike Frysinger vapier.adi at gmail.com
Mon Apr 11 18:08:48 EDT 2011


On Mon, Apr 11, 2011 at 17:50,  <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; })

we probably want to make these inline funcs.  otherwise we get
misbehavior if someone does something like:
    dbg_dump_index(c++);
-mike



More information about the linux-mtd mailing list