kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #28058
Avoid shadowed variables.
I'll very happy if developers could add this option when compiling Kicad:
-DCMAKE_CXX_FLAGS="-Wshadow"
Shadowed variables do not create issues for a compiler, but human readers are not compilers
(fortunately)
Using this option, I found at least one serious bug, when a shadowed var is a class member.
In all cases, this is a potential source of bugs, therefore it should be avoided.
Thanks.
--
Jean-Pierre CHARRAS
Follow ups