Re: Cleanup shadows variable warnings, round 1
Álvaro Herrera <alvherre@kurilemu.de>
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>, Peter Eisentraut <peter@eisentraut.org>, Peter Smith <smithpb2250@gmail.com>
Date: 2026-03-03T10:26:32Z
Lists: pgsql-hackers
Pushed 0001. Three things about the next ones, 1. if you rename a function argument, then the function declaration should match the new name as well. 2. xlogrecovery.c has far too many global variables. Can we use this opportunity to try to get rid of some of them? Especially one called "xlogreader" is I think quite bug-prone. 3. I disagree with some of the choices made; for instance rather than rename the local "progname" variables in all those places, I would rename the global to logging_progname in logging.c; in bringetbitmap (0002) I would rename the outer "tmp" to "sizecheck" or something like that. I guess this is mostly matter of mostly arbitrary judgment ... -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix new-to-v19 -Wshadow warnings
- 4f0cbc6fb5df 19 (unreleased) landed
-
Reduce scope of for-loop-local variables to avoid shadowing
- cece37c9843c 19 (unreleased) landed
-
Fix local-variable shadowing in pg_trgm's printSourceNFA().
- cdaa67565867 19 (unreleased) cited