mirror of
https://github.com/postgres/postgres.git
synced 2025-09-08 00:47:37 +03:00
Clean up compiler warnings from unused variables with asserts disabled
For those variables only used when asserts are enabled, use a new macro PG_USED_FOR_ASSERTS_ONLY, which expands to __attribute__((unused)) when asserts are not enabled.
This commit is contained in:
@@ -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 */
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user