Minor compil and Coverity fixes

This commit is contained in:
jean-pierre charras 2024-03-06 13:05:21 +01:00
parent 9b54537e38
commit 5ac8449e1f
3 changed files with 3 additions and 4 deletions

View File

@ -1330,7 +1330,6 @@ void EE_SELECTION_TOOL::GuessSelectionCandidates( EE_COLLECTOR& collector, const
EDA_ITEM* item = collector[ i ]; EDA_ITEM* item = collector[ i ];
SCH_LINE* line = dynamic_cast<SCH_LINE*>( item ); SCH_LINE* line = dynamic_cast<SCH_LINE*>( item );
LIB_SHAPE* shape = dynamic_cast<LIB_SHAPE*>( item ); LIB_SHAPE* shape = dynamic_cast<LIB_SHAPE*>( item );
SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( item );
SCH_TABLE* table = dynamic_cast<SCH_TABLE*>( item ); SCH_TABLE* table = dynamic_cast<SCH_TABLE*>( item );
// Lines are hard to hit. Give them a bit more slop to still be considered "exact". // Lines are hard to hit. Give them a bit more slop to still be considered "exact".

View File

@ -240,8 +240,8 @@ void UPDATE_MANAGER::CheckForUpdate( wxWindow* aNoticeParent )
// basically saving the last received update prevents us from // basically saving the last received update prevents us from
// prompting again // prompting again
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager(); SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
KICAD_SETTINGS* settings = mgr.GetAppSettings<KICAD_SETTINGS>(); KICAD_SETTINGS* curr_settings = mgr.GetAppSettings<KICAD_SETTINGS>();
settings->m_lastReceivedUpdate = response.version; curr_settings->m_lastReceivedUpdate = response.version;
} }
} ); } );
} }

View File

@ -333,7 +333,7 @@ void SHAPE_ARC::update_bbox()
// Very large is here > INT_MAX/2 // Very large is here > INT_MAX/2
double d_radius = GetRadius(); double d_radius = GetRadius();
if( d_radius < INT_MAX/2 ) if( d_radius < (double)INT_MAX/2.0 )
{ {
VECTOR2I center = GetCenter(); VECTOR2I center = GetCenter();