Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9959abb

Browse files
committed
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.
1 parent 5b51683 commit 9959abb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/include/c.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,12 @@ typedef NameData *Name;
578578
*/
579579
#ifndef USE_ASSERT_CHECKING
580580

581-
#define Assert(condition)
581+
#define Assert(condition) ((void)true)
582582
#define AssertMacro(condition) ((void)true)
583-
#define AssertArg(condition)
584-
#define AssertState(condition)
583+
#define AssertArg(condition) ((void)true)
584+
#define AssertState(condition) ((void)true)
585585
#define AssertPointerAlignment(ptr, bndr) ((void)true)
586-
#define Trap(condition, errorType)
586+
#define Trap(condition, errorType) ((void)true)
587587
#define TrapMacro(condition, errorType) (true)
588588

589589
#elif defined(FRONTEND)

0 commit comments

Comments
 (0)