[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 0/7] Steps towards enabling -Wshadow=local
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v3 0/7] Steps towards enabling -Wshadow=local |
Date: |
Fri, 29 Sep 2023 07:56:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Markus Armbruster <armbru@redhat.com> 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 1.
>
> Enabling -Wshadow would prevent bugs like this one. But we'd have to
> clean up all the offenders first. We got a lot of them.
>
> Enabling -Wshadow=local should be less work for almost as much gain.
> I took a stab at it. There's a small, exciting part, and a large,
> boring part.
>
> The exciting part is dark preprocessor sorcery to let us nest macro
> calls without shadowing: PATCH 7.
[...]
Queued.
- [PATCH v3 0/7] Steps towards enabling -Wshadow=local, Markus Armbruster, 2023/09/21
- [PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error, Markus Armbruster, 2023/09/21
- [PATCH v3 4/7] block/dirty-bitmap: Clean up local variable shadowing, Markus Armbruster, 2023/09/21
- [PATCH v3 7/7] qobject atomics osdep: Make a few macros more hygienic, Markus Armbruster, 2023/09/21
- [PATCH v3 5/7] block/vdi: Clean up local variable shadowing, Markus Armbruster, 2023/09/21
- [PATCH v3 3/7] ui: Clean up local variable shadowing, Markus Armbruster, 2023/09/21
- [PATCH v3 2/7] migration: Clean up local variable shadowing, Markus Armbruster, 2023/09/21
- [PATCH v3 6/7] block: Clean up local variable shadowing, Markus Armbruster, 2023/09/21
- Re: [PATCH v3 0/7] Steps towards enabling -Wshadow=local,
Markus Armbruster <=