[RFC]: (void)0 instead of empty defines
Andriy Gapon
avg at freebsd.org
Tue Jun 16 10:40:32 UTC 2009
on 15/06/2009 22:38 Marcel Moolenaar said the following:
> If the patch is all we need to compile the kernel with the warning
> enabled and knowing that the warning has already found real bugs,
> then it's a no-brainer to me: commit.
I agree - if FOO is a function-like or complete-statement-like macro than it is
more consistent to expand it to no-op statement than to nothing. (I am not sure if
the same is true for other type of macros, e.g. expression-like ones).
BTW, I think that this is a very typical practice, many C projects that I worked
on used this convention. Our assert.h also does this.
--
Andriy Gapon
More information about the freebsd-current
mailing list