fix warning in fs/ubifs compiled with gcc-4.5
Artem Bityutskiy
dedekind1 at gmail.com
Mon Mar 14 04:29:00 EDT 2011
Hi
On Fri, 2011-03-11 at 16:35 -0800, Jian Peng wrote:
> -#define ubifs_debugging_init(c) 0
> -#define ubifs_debugging_exit(c) ({})
> +#define ARG1(a) a
> +#define ARG2(a1, a2) a1, a2
> +#define ARG3(a1, a2, a3) a1, a2, a3
> +#define ARG4(a1, a2, a3, a4) a1, a2, a3, a4
> +
> +#define void_F(name, x) \
> +static inline void name(x) \
> +{ \
> + return; \
> +}
> +
> +#define int_F(name, x) \
> +static inline int name(x) \
> +{ \
> + return 0; \
> +}
> +
> +int_F(ubifs_debugging_init, ARG1(struct ubifs_info *c))
> +void_F(ubifs_debugging_exit, ARG1(struct ubifs_info *c))
> +
> +/* Dump functions */
> +void_F(dbg_dump_inode, ARG2(const struct ubifs_info *c,
> + const struct inode *inode))
Thanks, but this is a too complex solution, I think. It turns easy to
read code into some cryptic and difficult to read code, IMO May be we
can invent something simpler?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list