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:
2
src/backend/utils/cache/syscache.c
vendored
2
src/backend/utils/cache/syscache.c
vendored
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user