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

Lines changed: 4 additions & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy