← Back to team overview

kicad-developers team mailing list archive

Re: Patches to correct some warnings

 

>>
>> No, I passed through that path and rejected it.  Tell the compiler to shut up.
>>
>>
> 
> Did you happen to check the logic on a C++11 compiler? There is an ifdef on lines 58-60 of the file include/layers_id_colors_and_visibility.h that sets the type of the enum to unsigned char on a C++11 compiler. I suspect that is the cause of the warning, because unsigned isn’t sign extended when it is promoted. The warning saying that the code may not be doing what you intended to do, which is why I brought it up to the list.
> 
> Michael


When we last visited the decision to support C++11, it was a conscious "not yet" decision.
 So no, I did not and would not test against C++11, since it is not a current objective.

Try making the enum a signed char for your compiler.  If that does not work, simply remove
the enum typing and try that.   The size of the enum only saves a few bytes when we have
arrays of them, and that is limited.

Again I don't like the patch 4, since I tried that weeks ago and deliberately chose to go
a different way.


Your explanations and patch styles were very good BTW.

Dick





References