From: Andres Freund Date: Mon, 8 Dec 2014 19:28:09 +0000 (+0100) Subject: Define Assert() et al to ((void)0) to avoid pedantic warnings. X-Git-Tag: REL9_5_ALPHA1~1024 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9959abb0122ca2b0e4817e20954e3083c90becdc;p=postgresql Define Assert() et al to ((void)0) to avoid pedantic warnings. gcc's -Wempty-body warns about the current usage when compiling postgres without --enable-cassert. --- diff --git a/src/include/c.h b/src/include/c.h index ce38d78736..93d6924c5c 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -578,12 +578,12 @@ typedef NameData *Name; */ #ifndef USE_ASSERT_CHECKING -#define Assert(condition) +#define Assert(condition) ((void)true) #define AssertMacro(condition) ((void)true) -#define AssertArg(condition) -#define AssertState(condition) +#define AssertArg(condition) ((void)true) +#define AssertState(condition) ((void)true) #define AssertPointerAlignment(ptr, bndr) ((void)true) -#define Trap(condition, errorType) +#define Trap(condition, errorType) ((void)true) #define TrapMacro(condition, errorType) (true) #elif defined(FRONTEND)