1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

Silence warnings about unused global variables

Similar to commit "Remove unused global variables", silence
-Wunused-but-set-global warnings from clang 23 (included in -Wall).
These are variables that are used in assert-enabled builds only, so
annotate them with PG_USED_FOR_ASSERTS_ONLY.
This commit is contained in:
Peter Eisentraut
2026-09-22 19:30:29 +02:00
parent bd003dca09
commit 8e183d9bd4
2 changed files with 2 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ StaticAssertDecl(lengthof(cacheinfo) == SysCacheSize,
static CatCache *SysCache[SysCacheSize];
static bool CacheInitialized = false;
static bool CacheInitialized PG_USED_FOR_ASSERTS_ONLY = false;
/* Sorted array of OIDs of tables that have caches on them */
static Oid SysCacheRelationOid[SysCacheSize];

View File

@@ -47,7 +47,7 @@ typedef struct
* Priority of last call to the release callback.
* This is used to check that the resources are released in correct order.
*/
static uint32 last_release_priority = 0;
static uint32 last_release_priority PG_USED_FOR_ASSERTS_ONLY = 0;
/* prototypes for local functions */
static void ReleaseManyTestResource(Datum res);