Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43465cb

Browse files
author
Marina Polyakova
committed
Fix compiler warnings due to new checks in PostgreSQL 16
See the commit 0fe954c28584169938e5c0738cfaa9930ce77577 (Add -Wshadow=compatible-local to the standard compilation flags) in PostgreSQL 16. src/ruminsert.c: In function ‘rumHeapTupleBulkInsert’: src/ruminsert.c:533:51: warning: declaration of ‘attr’ shadows a previous local [-Wshadow=compatible-local] 533 | Form_pg_attribute attr = RumTupleDescAttr( | ^~~~ src/ruminsert.c:505:27: note: shadowed declaration is here 505 | Form_pg_attribute attr = buildstate->rumstate.addAttrs[attnum - 1]; | ^~~~ src/rumget.c: In function ‘startScanEntry’: src/rumget.c:635:41: warning: declaration of ‘page’ shadows a previous local [-Wshadow=compatible-local] 635 | Page page; | ^~~~ src/rumget.c:548:25: note: shadowed declaration is here 548 | Page page; | ^~~~ src/rumget.c: In function ‘entryGetNextItemList’: src/rumget.c:1054:33: warning: declaration of ‘page’ shadows a previous local [-Wshadow=compatible-local] 1054 | Page page; | ^~~~ src/rumget.c:986:25: note: shadowed declaration is here 986 | Page page; | ^~~~
1 parent 884bd51 commit 43465cb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/rumget.c

-2
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ startScanEntry(RumState * rumstate, RumScanEntry entry, Snapshot snapshot)
632632
{
633633
BlockNumber rootPostingTree = RumGetPostingTree(itup);
634634
RumPostingTreeScan *gdi;
635-
Page page;
636635
OffsetNumber maxoff,
637636
i;
638637
Pointer ptr;
@@ -1051,7 +1050,6 @@ entryGetNextItemList(RumState * rumstate, RumScanEntry entry, Snapshot snapshot)
10511050
{
10521051
BlockNumber rootPostingTree = RumGetPostingTree(itup);
10531052
RumPostingTreeScan *gdi;
1054-
Page page;
10551053
OffsetNumber maxoff,
10561054
i;
10571055
Pointer ptr;

src/ruminsert.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,11 @@ rumHeapTupleBulkInsert(RumBuildState * buildstate, OffsetNumber attnum,
530530
/* Check existance of additional information attribute in index */
531531
if (!attr)
532532
{
533-
Form_pg_attribute attr = RumTupleDescAttr(
533+
Form_pg_attribute current_attr = RumTupleDescAttr(
534534
buildstate->rumstate.origTupdesc, attnum - 1);
535535

536536
elog(ERROR, "additional information attribute \"%s\" is not found in index",
537-
NameStr(attr->attname));
537+
NameStr(current_attr->attname));
538538
}
539539

540540
addInfo[i] = datumCopy(addInfo[i], attr->attbyval, attr->attlen);

0 commit comments

Comments
 (0)