Re: Cleanup shadows variable warnings, round 1

Chao Li <li.evan.chao@gmail.com>

From: Chao Li <li.evan.chao@gmail.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: Álvaro Herrera <alvherre@kurilemu.de>, Peter Eisentraut <peter@eisentraut.org>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-03T23:04:02Z
Lists: pgsql-hackers

> On Dec 4, 2025, at 05:00, Peter Smith <smithpb2250@gmail.com> wrote:
> 
> On Thu, Dec 4, 2025 at 1:36 AM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>> 
>> On 2025-Dec-03, Chao Li wrote:
>> 
>>> Unfortunately that doesn’t work for my compiler (clang on MacOS),
>>> that’s why I renamed “I" to “u”.
>> 
>> I think you're missing his point.  He's suggesting to change not only
>> this variable, but also the other uses of "i" in this function.
>> 
> 
> Exactly. I should have posted the larger diff, as you did. Thanks for
> clarifying.
> 

Sorry for misunderstanding you. I guess I read your message too quickly yesterday. Will fix it in v4.

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 →
  1. Fix new-to-v19 -Wshadow warnings

  2. Reduce scope of for-loop-local variables to avoid shadowing

  3. Fix local-variable shadowing in pg_trgm's printSourceNFA().