Fix shadow warnings in logical replication code

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Fix shadow warnings in logical replication code
Date: 2023-08-29 23:16:38
Message-ID: CAHut+PuR0y4ofNOxi691VTVWmBfScHV9AaBMGSpeh8+DKp81Nw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The -Wshadow compiler option reported 3 shadow warnings within the
logical replication files. (These are all in old code)

PSA a patch to address those.

======

logicalfuncs.c:184:13: warning: declaration of ‘name’ shadows a
previous local [-Wshadow]
char *name = TextDatumGetCString(datum_opts[i]);
^
logicalfuncs.c:105:8: warning: shadowed declaration is here [-Wshadow]
Name name;
^

~~~

reorderbuffer.c:4843:10: warning: declaration of ‘isnull’ shadows a
previous local [-Wshadow]
bool isnull;
^
reorderbuffer.c:4734:11: warning: shadowed declaration is here [-Wshadow]
bool *isnull;
^

~~~

walsender.c:3543:14: warning: declaration of ‘sentPtr’ shadows a
global declaration [-Wshadow]
XLogRecPtr sentPtr;
^
walsender.c:155:19: warning: shadowed declaration is here [-Wshadow]
static XLogRecPtr sentPtr = InvalidXLogRecPtr;
^

------
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v1-0001-Remove-shadows-found-in-logical-replication-files.patch application/octet-stream 3.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-08-29 23:22:27 Re: pg_stat_get_backend_subxact() and backend IDs?
Previous Message Michael Paquier 2023-08-29 23:05:57 Re: Avoid a possible overflow (src/backend/utils/sort/logtape.c)