Reduce scope of for-loop-local variables to avoid shadowing
Álvaro Herrera <alvherre@kurilemu.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/backup/basebackup_incremental.c | modified | +4 −6 |
| src/backend/parser/parse_target.c | modified | +4 −6 |
Discussion
- Cleanup shadows variable warnings, round 1 32 messages · 2025-11-28 → 2026-04-23