Message ID | 1351457835-7553-7-git-send-email-daniel.santos@pobox.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Sun, Oct 28, 2012 at 03:57:13PM -0500, danielfsantos@att.net wrote: > When __CHECKER__ is defined, we disable all of the BUILD_BUG.* macros. > However, BUILD_BUG_ON was evaluating to nothing in this case, and we > want (0) since this is a function-like macro that will be followed by a > semicolon. > > Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Acked-by: Borislav Petkov <bp@alien8.de>
diff --git a/include/linux/bug.h b/include/linux/bug.h index da03dc1..6c38988 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -16,7 +16,7 @@ struct pt_regs; #define BUILD_BUG_ON_NOT_POWER_OF_2(n) #define BUILD_BUG_ON_ZERO(e) (0) #define BUILD_BUG_ON_NULL(e) ((void*)0) -#define BUILD_BUG_ON(condition) +#define BUILD_BUG_ON(condition) (0) #define BUILD_BUG() (0) #else /* __CHECKER__ */
When __CHECKER__ is defined, we disable all of the BUILD_BUG.* macros. However, BUILD_BUG_ON was evaluating to nothing in this case, and we want (0) since this is a function-like macro that will be followed by a semicolon. Signed-off-by: Daniel Santos <daniel.santos@pobox.com> --- include/linux/bug.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)