← Back to team overview

kicad-developers team mailing list archive

Re: Avoid shadowed variables.

 

I'm OK with that.

On 2/22/2017 12:56 PM, Simon Wells wrote:
> why not just add it to the default cmake files, It won't affect users
> if its enabled anyway,
> 
> On 23 February 2017 at 01:12, jp charras <jp.charras@xxxxxxxxxx> wrote:
>> 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
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



References