← Back to team overview

kicad-developers team mailing list archive

Re: compil warning in eagle plugin.

 

Hi Jean-Pierre,

I have just fixed it. Fortunately, 'radius' is used in a while loop that
requires the preceding if clause to be true. 'Radius' is initialized in
the mentioned if clause body, so it should never run with an
uninitialized value.

Regards,
Orson

On 03/14/2018 03:21 PM, jp charras wrote:
> Could a Eagle guru have a look into the code creating this compil warning:
> 
> F:/kicad-launchpad/zone_on_grid/pcbnew/eagle_plugin.cpp:1811:50: warning: 'radius' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>                          wxPoint end( int( radius * cos( end_angle + angle ) + center.x ),
>                                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
> F:/kicad-launchpad/zone_on_grid/pcbnew/eagle_plugin.cpp:1812:55: warning: 'end_angle' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>                                       int( radius * sin( end_angle + angle ) + center.y ) );
> 
> It looks to me these variables are really used without initialization is some cases.
> 
> Thanks.
> 


Attachment: signature.asc
Description: OpenPGP digital signature


References