projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb30542
)
Suppress new "may be used uninitialized" warning.
author
Noah Misch
<noah@leadboat.com>
Sun, 3 Nov 2024 02:42:52 +0000
(19:42 -0700)
committer
Noah Misch
<noah@leadboat.com>
Sun, 3 Nov 2024 02:42:57 +0000
(19:42 -0700)
Buildfarm member mamba fails to deduce that the function never uses this
variable without initializing it. Back-patch to v12, like commit
b412f402d1e020c5dac94f3bf4a005db69519b99
.
src/backend/catalog/index.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/catalog/index.c
b/src/backend/catalog/index.c
index d3b6d08120853b45e740591cdbfca695cef9706a..33405bbb21cc639dc6a9c42984c2722e12bf26ba 100644
(file)
--- a/
src/backend/catalog/index.c
+++ b/
src/backend/catalog/index.c
@@
-2793,8
+2793,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];
@@
-2831,8
+2831,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;
}
/*