Re: Fix shadow warnings in logical replication code

2023-08-30 Thread Peter Smith
On Thu, Aug 31, 2023 at 9:39 AM Michael Paquier wrote: > > On Wed, Aug 30, 2023 at 09:50:17AM +0800, Richard Guo wrote: > > Yeah, IIRC the source tree currently is able to be built without any > > shadow-related warnings with -Wshadow=compatible-local. But with > > -Wshadow or -Wshadow=local, you

Re: Fix shadow warnings in logical replication code

2023-08-30 Thread Michael Paquier
On Wed, Aug 30, 2023 at 09:50:17AM +0800, Richard Guo wrote: > Yeah, IIRC the source tree currently is able to be built without any > shadow-related warnings with -Wshadow=compatible-local. But with > -Wshadow or -Wshadow=local, you can still see a lot of warnings. Yep. I've addressed on HEAD th

Re: Fix shadow warnings in logical replication code

2023-08-29 Thread Richard Guo
On Wed, Aug 30, 2023 at 8:49 AM Michael Paquier wrote: > There is much more going on with -Wshadow, but let's do things > incrementally, case by case. Yeah, IIRC the source tree currently is able to be built without any shadow-related warnings with -Wshadow=compatible-local. But with -Wshadow

Re: Fix shadow warnings in logical replication code

2023-08-29 Thread Michael Paquier
On Wed, Aug 30, 2023 at 09:16:38AM +1000, Peter Smith wrote: > 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 [-Wshad