Re: [v3] Help wanted for enabling -Wshadow=local

2023-10-09 Thread Thomas Huth
On 06/10/2023 21.08, Warner Losh wrote: On Fri, Oct 6, 2023, 11:55 AM Thomas Huth > wrote: On 06/10/2023 18.18, Thomas Huth wrote: > On 06/10/2023 16.45, Markus Armbruster wrote: >> Local variables shadowing other local variables or parameters make the

Re: [v3] Help wanted for enabling -Wshadow=local

2023-10-09 Thread Markus Armbruster
Warner Losh writes: > On Fri, Oct 6, 2023, 11:55 AM Thomas Huth wrote: > >> On 06/10/2023 18.18, Thomas Huth wrote: >> > On 06/10/2023 16.45, Markus Armbruster wrote: >> >> Local variables shadowing other local variables or parameters make the >> >> code needlessly hard to understand. Bugs

Re: [v3] Help wanted for enabling -Wshadow=local

2023-10-06 Thread Warner Losh
On Fri, Oct 6, 2023, 11:55 AM Thomas Huth wrote: > On 06/10/2023 18.18, Thomas Huth wrote: > > On 06/10/2023 16.45, Markus Armbruster wrote: > >> Local variables shadowing other local variables or parameters make the > >> code needlessly hard to understand. Bugs love to hide in such code. > >>

Re: [v3] Help wanted for enabling -Wshadow=local

2023-10-06 Thread Markus Armbruster
Markus Armbruster writes: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Bugs love to hide in such code. > Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail > on polling error". > > Enabling -Wshadow would

Re: [v3] Help wanted for enabling -Wshadow=local

2023-10-06 Thread Thomas Huth
On 06/10/2023 18.18, Thomas Huth wrote: On 06/10/2023 16.45, Markus Armbruster wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand.  Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to

Re: [v3] Help wanted for enabling -Wshadow=local

2023-10-06 Thread Thomas Huth
On 06/10/2023 16.45, Markus Armbruster wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". Enabling -Wshadow

[v3] Help wanted for enabling -Wshadow=local

2023-10-06 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". Enabling -Wshadow would prevent bugs like this one. But we have to