From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reduce scope of for-loop-local variables to avoid shadowing
Date: Tue, 03 Mar 2026 12:11:52 +0000
Message-ID: <E1vxObQ-002AMr-25@gemulon.postgresql.org> (raw)
Reduce scope of for-loop-local variables to avoid shadowing
Adjust a couple of for-loops where a local variable was shadowed by
another in the same scope, by renaming it as well as reducing its scope
to the containing for-loop.
Author: Chao Li <lic@highgo.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CAEoWx2kQ2x5gMaj8tHLJ3=jfC+p5YXHkJyHrDTiQw2nn2FJTmQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cece37c9843c980b5be2f6d24c2b9cef1f9429a7
Modified Files
--------------
src/backend/backup/basebackup_incremental.c | 10 ++++------
src/backend/parser/parse_target.c | 10 ++++------
2 files changed, 8 insertions(+), 12 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Reduce scope of for-loop-local variables to avoid shadowing
In-Reply-To: <E1vxObQ-002AMr-25@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox