aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/spgist/spgdoinsert.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-08-24 22:04:28 +1200
committerDavid Rowley <drowley@postgresql.org>2022-08-24 22:04:28 +1200
commitf959bf9a5b9cecd2f6e6bdd24a34a7b269b00827 (patch)
tree55fedf0a343e02c1d1f2322a17be8399947f24be /src/backend/access/spgist/spgdoinsert.c
parent161355ee6d2c64c0c4853a0646795028d666f052 (diff)
downloadpostgresql-f959bf9a5b9cecd2f6e6bdd24a34a7b269b00827.tar.gz
postgresql-f959bf9a5b9cecd2f6e6bdd24a34a7b269b00827.zip
Further -Wshadow=compatible-local warning fixes
These should have been included in 421892a19 as these shadowed variable warnings can also be fixed by adjusting the scope of the shadowed variable to put the declaration for it in an inner scope. This is part of the same effort as f01592f91. By my count, this takes the warning count from 114 down to 106. Author: David Rowley and Justin Pryzby Discussion: https://postgr.es/m/CAApHDvrwLGBP%2BYw9vriayyf%3DXR4uPWP5jr6cQhP9au_kaDUhbA%40mail.gmail.com
Diffstat (limited to 'src/backend/access/spgist/spgdoinsert.c')
-rw-r--r--src/backend/access/spgist/spgdoinsert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/access/spgist/spgdoinsert.c b/src/backend/access/spgist/spgdoinsert.c
index e84b5edc035..f6aced03d37 100644
--- a/src/backend/access/spgist/spgdoinsert.c
+++ b/src/backend/access/spgist/spgdoinsert.c
@@ -395,7 +395,6 @@ moveLeafs(Relation index, SpGistState *state,
size;
Buffer nbuf;
Page npage;
- SpGistLeafTuple it;
OffsetNumber r = InvalidOffsetNumber,
startOffset = InvalidOffsetNumber;
bool replaceDead = false;
@@ -467,6 +466,8 @@ moveLeafs(Relation index, SpGistState *state,
{
for (i = 0; i < nDelete; i++)
{
+ SpGistLeafTuple it;
+
it = (SpGistLeafTuple) PageGetItem(current->page,
PageGetItemId(current->page, toDelete[i]));
Assert(it->tupstate == SPGIST_LIVE);