diff options
author | Noah Misch <noah@leadboat.com> | 2024-11-02 19:42:52 -0700 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2024-11-02 19:42:57 -0700 |
commit | 4dc0c933f30bf5db5aa07acee6ff5f1e2f16401e (patch) | |
tree | da65279da785e0aea09c86cfe6b406d64004bcd9 | |
parent | 6b01cac0be6dd044fa3c2d08df7e893b96dfafe6 (diff) |
Suppress new "may be used uninitialized" warning.
Buildfarm member mamba fails to deduce that the function never uses this
variable without initializing it. Back-patch to v12, like commit
b412f402d1e020c5dac94f3bf4a005db69519b99.
-rw-r--r-- | src/backend/catalog/index.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index a59cabf8e13..13a14425177 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -2789,8 +2789,8 @@ index_update_stats(Relation rel, double reltuples) { bool update_stats; - BlockNumber relpages; - BlockNumber relallvisible; + BlockNumber relpages = 0; /* keep compiler quiet */ + BlockNumber relallvisible = 0; Oid relid = RelationGetRelid(rel); Relation pg_class; ScanKeyData key[1]; @@ -2827,8 +2827,6 @@ index_update_stats(Relation rel, if (rel->rd_rel->relkind != RELKIND_INDEX) visibilitymap_count(rel, &relallvisible, NULL); - else /* don't bother for indexes */ - relallvisible = 0; } /* |