← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Fix 'catching polymorphic type by value' warnings

 

Thank you John, I have just pushed your patch.

Cheers,
Orson

On 06/05/2018 10:02 AM, John Beard wrote:
> Hi,
> 
> Sorry, I missed one out in kicad/import_project.cpp
> 
> Cheers,
> 
> John
> 
> On Tue, Jun 5, 2018 at 8:43 AM, John Beard <john.j.beard@xxxxxxxxx> wrote:
> 
>> Hi,
>>
>> Small patch to fix some warnings (GCC 8.1.0) like this:
>>
>> warning: catching polymorphic type ‘class std::out_of_range’ by value
>> [-Wcatch-value=]
>>          catch( std::out_of_range )
>>                      ^~~~~~~~~~~~
>>
>> Fixed by changing to catch-by-reference: "catch( const std:::out_of_range&
>> )"
>>
>> C.f. recent commit ff1802d7a "Fix Coverity "Big parameter passed by value"
>> warnings".
>>
>> As one of these fixes is in view.h, the warning came up a fair bit.
>>
>> Cheers,
>>
>> John
>>
> 
> 
> 
> _______________________________________________
> 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
> 


Attachment: signature.asc
Description: OpenPGP digital signature


References