kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #28097
Re: Avoid shadowed variables.
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Wed, 22 Feb 2017 18:43:50 -0500
-
In-reply-to:
<CAJQyTMCg=NXGg5FUT8=qo3nF0ySU1rH6W5POZ9CMJTa53CaC0g@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
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