From b5934bfd6071fed3a38cea0cfaa93afda63d9c0c Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Thu, 31 Aug 2023 08:07:48 +0900 Subject: Fix some shadow variables in src/backend/replication/ The code is able to compile already without warnings under -Wshadow=compatible-local, which is itself already enabled in the tree, and the ones fixed here showed up with the more restrictive -Wshadow. There are more of these that we may want to look at, and the ones fixed here made the code confusing. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+PuR0y4ofNOxi691VTVWmBfScHV9AaBMGSpeh8+DKp81Nw@mail.gmail.com --- src/backend/replication/logical/logicalfuncs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/replication/logical/logicalfuncs.c') diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c index 55a24c02c94..197169d6b0d 100644 --- a/src/backend/replication/logical/logicalfuncs.c +++ b/src/backend/replication/logical/logicalfuncs.c @@ -181,10 +181,10 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo fcinfo, bool confirm, bool bin for (i = 0; i < nelems; i += 2) { - char *name = TextDatumGetCString(datum_opts[i]); + char *optname = TextDatumGetCString(datum_opts[i]); char *opt = TextDatumGetCString(datum_opts[i + 1]); - options = lappend(options, makeDefElem(name, (Node *) makeString(opt), -1)); + options = lappend(options, makeDefElem(optname, (Node *) makeString(opt), -1)); } } -- cgit v1.2.3