postgres.git / summary / log / commit / refs

commit    9dc7554abe4c7a545c9546ee61dfc53a21cbb454
Author:   Peter Eisentraut <peter@eisentraut.org>
Date:     Tue Sep 22 17:30:29 2026 +0000

    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.


src/backend/utils/cache/syscache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index da92610522a..ee1b0a6bba2 100644 --- a/src/backend/utils/cache/syscache.c +++ b/src/backend/utils/cache/syscache.c @@ -1058,7 +1058,7 @@ static const struct cachedesc cacheinfo[] = { 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]; [parent: 274da088e021]