From 772dc2f24a67b1144f392b10a26283ee49b71823 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 20 Oct 2017 13:48:36 +0200 Subject: [PATCH] Fix compil warnings --- eeschema/sch_eagle_plugin.cpp | 2 +- pcbnew/class_pad_custom_shape_functions.cpp | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/eeschema/sch_eagle_plugin.cpp b/eeschema/sch_eagle_plugin.cpp index 26c3e7dddc..3a82439d89 100644 --- a/eeschema/sch_eagle_plugin.cpp +++ b/eeschema/sch_eagle_plugin.cpp @@ -1331,7 +1331,7 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, pin->SetNumberTextSize( 0 ); } - for( int i = 0; i < pads.GetCount(); i++) + for( unsigned i = 0; i < pads.GetCount(); i++) { LIB_PIN* apin = new LIB_PIN( *pin ); diff --git a/pcbnew/class_pad_custom_shape_functions.cpp b/pcbnew/class_pad_custom_shape_functions.cpp index 34e4779f45..779538e38d 100644 --- a/pcbnew/class_pad_custom_shape_functions.cpp +++ b/pcbnew/class_pad_custom_shape_functions.cpp @@ -362,6 +362,7 @@ bool D_PAD::GetBestAnchorPosition( VECTOR2I& aPos ) boost::optional bestAnchor; for ( int y = 0; y < stepsY ; y++ ) + { for ( int x = 0; x < stepsX; x++ ) { VECTOR2I p = bbox.GetPosition(); @@ -383,12 +384,13 @@ bool D_PAD::GetBestAnchorPosition( VECTOR2I& aPos ) } } } + } - if ( bestAnchor ) - { - aPos = *bestAnchor; - return true; - } + if ( bestAnchor ) + { + aPos = *bestAnchor; + return true; + } - return false; + return false; }