Re: [Kicad-developers] compil warning in eagle plugin.

2018-03-14 Thread Maciej SumiƄski
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.
> 




signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] compil warning in eagle plugin.

2018-03-14 Thread jp charras
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.

-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp