Fix minor compil and Coverity warnings.
This commit is contained in:
parent
56895db84c
commit
4db72f2d55
|
@ -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() )
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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 "
|
||||
|
|
Loading…
Reference in New Issue