diff options
author | David Rowley <drowley@postgresql.org> | 2022-10-05 21:01:41 +1300 |
---|---|---|
committer | David Rowley <drowley@postgresql.org> | 2022-10-05 21:01:41 +1300 |
commit | 2d0bbedda7c4fbf7092c39b0c06b56cb238e15d7 (patch) | |
tree | 5ded2ec68835504c3f10fcec732b80b7a2bc3f08 /src/backend/access/transam/clog.c | |
parent | 839c2520a7937b8895ff84fc8fc718dbfab5e72e (diff) | |
download | postgresql-2d0bbedda7c4fbf7092c39b0c06b56cb238e15d7.tar.gz postgresql-2d0bbedda7c4fbf7092c39b0c06b56cb238e15d7.zip |
Rename shadowed local variables
In a similar effort to f01592f91, here we mostly rename shadowed local
variables to remove the warnings produced when compiling with
-Wshadow=compatible-local.
This fixes 63 warnings and leaves just 5.
Author: Justin Pryzby, David Rowley
Reviewed-by: Justin Pryzby
Discussion https://postgr.es/m/20220817145434.GC26426%40telsasoft.com
Diffstat (limited to 'src/backend/access/transam/clog.c')
-rw-r--r-- | src/backend/access/transam/clog.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c index 3d9088a7048..a7dfcfb4da4 100644 --- a/src/backend/access/transam/clog.c +++ b/src/backend/access/transam/clog.c @@ -516,23 +516,23 @@ TransactionGroupUpdateXidStatus(TransactionId xid, XidStatus status, /* Walk the list and update the status of all XIDs. */ while (nextidx != INVALID_PGPROCNO) { - PGPROC *proc = &ProcGlobal->allProcs[nextidx]; + PGPROC *nextproc = &ProcGlobal->allProcs[nextidx]; /* * Transactions with more than THRESHOLD_SUBTRANS_CLOG_OPT sub-XIDs * should not use group XID status update mechanism. */ - Assert(proc->subxidStatus.count <= THRESHOLD_SUBTRANS_CLOG_OPT); + Assert(nextproc->subxidStatus.count <= THRESHOLD_SUBTRANS_CLOG_OPT); - TransactionIdSetPageStatusInternal(proc->clogGroupMemberXid, - proc->subxidStatus.count, - proc->subxids.xids, - proc->clogGroupMemberXidStatus, - proc->clogGroupMemberLsn, - proc->clogGroupMemberPage); + TransactionIdSetPageStatusInternal(nextproc->clogGroupMemberXid, + nextproc->subxidStatus.count, + nextproc->subxids.xids, + nextproc->clogGroupMemberXidStatus, + nextproc->clogGroupMemberLsn, + nextproc->clogGroupMemberPage); /* Move to next proc in list. */ - nextidx = pg_atomic_read_u32(&proc->clogGroupNext); + nextidx = pg_atomic_read_u32(&nextproc->clogGroupNext); } /* We're done with the lock now. */ @@ -545,18 +545,18 @@ TransactionGroupUpdateXidStatus(TransactionId xid, XidStatus status, */ while (wakeidx != INVALID_PGPROCNO) { - PGPROC *proc = &ProcGlobal->allProcs[wakeidx]; + PGPROC *wakeproc = &ProcGlobal->allProcs[wakeidx]; - wakeidx = pg_atomic_read_u32(&proc->clogGroupNext); - pg_atomic_write_u32(&proc->clogGroupNext, INVALID_PGPROCNO); + wakeidx = pg_atomic_read_u32(&wakeproc->clogGroupNext); + pg_atomic_write_u32(&wakeproc->clogGroupNext, INVALID_PGPROCNO); /* ensure all previous writes are visible before follower continues. */ pg_write_barrier(); - proc->clogGroupMember = false; + wakeproc->clogGroupMember = false; - if (proc != MyProc) - PGSemaphoreUnlock(proc->sem); + if (wakeproc != MyProc) + PGSemaphoreUnlock(wakeproc->sem); } return true; |