Skip to content

Commit 4dc0c93

Browse files
committed
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 b412f40.
1 parent 6b01cac commit 4dc0c93

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/backend/catalog/index.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -2789,8 +2789,8 @@ index_update_stats(Relation rel,
27892789
double reltuples)
27902790
{
27912791
bool update_stats;
2792-
BlockNumber relpages;
2793-
BlockNumber relallvisible;
2792+
BlockNumber relpages = 0; /* keep compiler quiet */
2793+
BlockNumber relallvisible = 0;
27942794
Oid relid = RelationGetRelid(rel);
27952795
Relation pg_class;
27962796
ScanKeyData key[1];
@@ -2827,8 +2827,6 @@ index_update_stats(Relation rel,
28272827

28282828
if (rel->rd_rel->relkind != RELKIND_INDEX)
28292829
visibilitymap_count(rel, &relallvisible, NULL);
2830-
else /* don't bother for indexes */
2831-
relallvisible = 0;
28322830
}
28332831

28342832
/*

0 commit comments

Comments
 (0)