Re: Cleanup shadows variable warnings, round 1
Chao Li <li.evan.chao@gmail.com>
From: Chao Li <li.evan.chao@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>,
Peter Eisentraut <peter@eisentraut.org>,
Peter Smith <smithpb2250@gmail.com>
Date: 2026-03-03T11:55:36Z
Lists: pgsql-hackers
> On Mar 3, 2026, at 18:26, Álvaro Herrera <alvherre@kurilemu.de> wrote: > > Pushed 0001. Hi Alvaro, thank you very much for pushing 0001. But I don’t see it. I tried to pull master and refresh https://git.postgresql.org/cgit/postgresql.git/log/?qt=grep&q=, none of them shows 0001 pushed. > > Three things about the next ones, > > 1. if you rename a function argument, then the function declaration > should match the new name as well. Sure, I will make sure that in next revision. > > 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. Okay, I will try to address this. > > 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 ... > I will rename them per your suggestion, and check if there are similar things to rename. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.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