Fix minor compil and Coverity warnings.

This commit is contained in:
jean-pierre charras 2022-07-07 12:38:34 +02:00
parent 56895db84c
commit 4db72f2d55
3 changed files with 5 additions and 2 deletions

View File

@ -235,7 +235,7 @@ BOM_GENERATOR_HANDLER* DIALOG_BOM::addGenerator( const wxString& aPath, const wx
BOM_GENERATOR_HANDLER* ret = nullptr;
auto plugin = std::make_unique<BOM_GENERATOR_HANDLER>( aPath );
if( !plugin )
if( !plugin->IsOk() )
return nullptr;
if( !aName.IsEmpty() )

View File

@ -93,11 +93,13 @@ DIALOG_PCM::DIALOG_PCM( wxWindow* parent ) : DIALOG_PCM_BASE( parent )
switch( aAction )
{
default:
case PPA_INSTALL:
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Install" ) );
m_gridPendingActions->SetCellValue( row, PENDING_COL_VERSION, aVersion );
new_state = PPS_PENDING_INSTALL;
break;
case PPA_UPDATE:
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Update" ) );
m_gridPendingActions->SetCellValue(
@ -105,6 +107,7 @@ DIALOG_PCM::DIALOG_PCM( wxWindow* parent ) : DIALOG_PCM_BASE( parent )
wxString::Format( wxT( "%s \u279C %s" ), aData.current_version, aVersion ) );
new_state = PPS_PENDING_UPDATE;
break;
case PPA_UNINSTALL:
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Uninstall" ) );
m_gridPendingActions->SetCellValue(

View File

@ -567,7 +567,7 @@ void PANEL_PACKAGES_VIEW::OnVersionActionClicked( wxCommandEvent& event )
return ver.version == version;
} );
wxASSERT_MSG( ver_it != package.versions.end(), "Could not find package version" );
wxCHECK_RET( ver_it != package.versions.end(), "Could not find package version" );
if( !ver_it->compatible
&& wxMessageBox( _( "This package version is incompatible with your kicad version or "