← Back to team overview

kicad-developers team mailing list archive

Re: Shiny New Warnings

 

On 1/17/2017 8:33 PM, Simon Richter wrote:
> Hi,
> 
> I just fixed the MSVC build by using a better FindPixman.cmake that
> doesn't make as many assumptions about the system.
> 
> There are a few new warnings that popped up:
> 
>> fp_lib_table.cpp:182, MSBuild, Priority: Normal
>> 'FP_LIB_TABLE::Parse': function assumed not to throw an exception but does
> 
>> symbol_lib_table.cpp:184, MSBuild, Priority: Normal
>> 'SYMBOL_LIB_TABLE::Parse': function assumed not to throw an exception
> but does
> 
> MSVC is right here, these are declared "throw()", but later on throw an
> exception.

These are fixed in my dev branch.  Hopefully I'll get this pushed to
master soon.

> 
>> opengl_gal.cpp:229, MSBuild, Priority: Normal
>> 'e': unreferenced local variable
> 
>> opengl_gal.cpp:1564, MSBuild, Priority: Normal
>> 'e': unreferenced local variable
> 
> These are exceptions caught by name, but never mentioned in the handler.
> 
>> bitmap_io.cpp:650, MSBuild, Priority: Normal
>> unary minus operator applied to unsigned type, result still unsigned
> 
>> greymap.cpp:738, MSBuild, Priority: Normal
>> unary minus operator applied to unsigned type, result still unsigned
> 
> These live in potrace, so this is a problem there. Here, the test is
> 
>     uint32_t h;
>     if(h > 0x7fffffff)
>         h = -h & 0xffffffff;
> 
> While we're unlikely to ever trigger that, I'm not sure what the
> intended effect of an unary minus on an unsigned value should be.
> 
>> lib_text.cpp:77, MSBuild, Priority: Normal
>> '>': unsafe use of type 'bool' in operation
> 
> Here, a boolean is tested for a value greater than 0. We can probably
> omit the comparison and use the boolean directly.
> 
>> dialog_pad_properties_base.cpp:562, MSBuild, Priority: Normal
>> 'wxFont::wxFont': deprecated: use wxFONT{FAMILY,STYLE,WEIGHT}_XXX
> constants ie: wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD
> 
>> dialog_pad_properties_base.cpp:598, MSBuild, Priority: Normal
>> 'wxFont::wxFont': deprecated: use wxFONT{FAMILY,STYLE,WEIGHT}_XXX
> constants ie: wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD
> 
> I think this was generated with an older version of wxformbuilder.
> 
> There are a few others about conversions with possible data loss, but
> MSVC is rather paranoid here, so I'm not listing them.
> 
>    Simon
> 
> 
> 
> _______________________________________________
> 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