diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/c.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/c.h b/src/include/c.h index 82acd14a9b4..96375ab567c 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -710,6 +710,18 @@ typedef NameData *Name; #define STATUS_WAITING (2) +/* + * Append PG_USED_FOR_ASSERTS_ONLY to definitions of variables that are only + * used in assert-enabled builds, to avoid compiler warnings about unused + * variables in assert-disabled builds. + */ +#ifdef USE_ASSERT_CHECKING +#define PG_USED_FOR_ASSERTS_ONLY +#else +#define PG_USED_FOR_ASSERTS_ONLY __attribute__((unused)) +#endif + + /* gettext domain name mangling */ /* |
