Fix shadow warnings in logical replication code - Mailing list pgsql-hackers

From Peter Smith
Subject Fix shadow warnings in logical replication code
Date
Msg-id CAHut+PuR0y4ofNOxi691VTVWmBfScHV9AaBMGSpeh8+DKp81Nw@mail.gmail.com
Whole thread Raw
Responses Re: Fix shadow warnings in logical replication code
List 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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Avoid a possible overflow (src/backend/utils/sort/logtape.c)
Next
From: Michael Paquier
Date:
Subject: Re: pg_stat_get_backend_subxact() and backend IDs?