Skip to content

Commit 54bc22f

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 0bcb9d0 commit 54bc22f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/backend/catalog/index.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2783,8 +2783,8 @@ index_update_stats(Relation rel,
27832783
double reltuples)
27842784
{
27852785
bool update_stats;
2786-
BlockNumber relpages;
2787-
BlockNumber relallvisible;
2786+
BlockNumber relpages = 0; /* keep compiler quiet */
2787+
BlockNumber relallvisible = 0;
27882788
Oid relid = RelationGetRelid(rel);
27892789
Relation pg_class;
27902790
ScanKeyData key[1];
@@ -2825,8 +2825,6 @@ index_update_stats(Relation rel,
28252825

28262826
if (rel->rd_rel->relkind != RELKIND_INDEX)
28272827
visibilitymap_count(rel, &relallvisible, NULL);
2828-
else /* don't bother for indexes */
2829-
relallvisible = 0;
28302828
}
28312829

28322830
/*

0 commit comments

Comments
 (0)