Re: Cleanup shadows variable warnings, round 1 - Mailing list pgsql-hackers

From Chao Li
Subject Re: Cleanup shadows variable warnings, round 1
Date
Msg-id 7F33AD9D-619D-4846-937A-F0EF982332A4@gmail.com
Whole thread Raw
In response to Cleanup shadows variable warnings, round 1  (Chao Li <li.evan.chao@gmail.com>)
List pgsql-hackers

> On Nov 28, 2025, at 16:16, Chao Li <li.evan.chao@gmail.com> wrote:
>
> Hi Hackers,
>
> While reviewing [1], it makes me recall an experience where I had a patch ready locally, but CommitFest CI failed
witha shadows-variable warning. Now I understand that -Wall doesn't by default enable -Wshadows with some compilers
likeclang. 
>
> I did a clean build with manually enabling -Wshadow and surprisingly found there are a lot of such warnings in the
currentcode base, roughly ~200 occurrences. 
>
> As there are too many, I plan to fix them all in 3-4 rounds. For round 1 patch, I'd see any objection, then decide if
toproceed more rounds. 
>
> [1] https://postgr.es/m/CAHut+PsF8R0Bt4J3c92+T2F0mun0rRfK=-GH+iBv2s-O8ahJJw@mail.gmail.com
>

CF entry added: https://commitfest.postgresql.org/patch/6262/

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: headerscheck ccache support
Next
From: Andrey Borodin
Date:
Subject: Re: Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors