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;
|
BOM_GENERATOR_HANDLER* ret = nullptr;
|
||||||
auto plugin = std::make_unique<BOM_GENERATOR_HANDLER>( aPath );
|
auto plugin = std::make_unique<BOM_GENERATOR_HANDLER>( aPath );
|
||||||
|
|
||||||
if( !plugin )
|
if( !plugin->IsOk() )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if( !aName.IsEmpty() )
|
if( !aName.IsEmpty() )
|
||||||
|
|
|
@ -93,11 +93,13 @@ DIALOG_PCM::DIALOG_PCM( wxWindow* parent ) : DIALOG_PCM_BASE( parent )
|
||||||
|
|
||||||
switch( aAction )
|
switch( aAction )
|
||||||
{
|
{
|
||||||
|
default:
|
||||||
case PPA_INSTALL:
|
case PPA_INSTALL:
|
||||||
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Install" ) );
|
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Install" ) );
|
||||||
m_gridPendingActions->SetCellValue( row, PENDING_COL_VERSION, aVersion );
|
m_gridPendingActions->SetCellValue( row, PENDING_COL_VERSION, aVersion );
|
||||||
new_state = PPS_PENDING_INSTALL;
|
new_state = PPS_PENDING_INSTALL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PPA_UPDATE:
|
case PPA_UPDATE:
|
||||||
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Update" ) );
|
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Update" ) );
|
||||||
m_gridPendingActions->SetCellValue(
|
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 ) );
|
wxString::Format( wxT( "%s \u279C %s" ), aData.current_version, aVersion ) );
|
||||||
new_state = PPS_PENDING_UPDATE;
|
new_state = PPS_PENDING_UPDATE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PPA_UNINSTALL:
|
case PPA_UNINSTALL:
|
||||||
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Uninstall" ) );
|
m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Uninstall" ) );
|
||||||
m_gridPendingActions->SetCellValue(
|
m_gridPendingActions->SetCellValue(
|
||||||
|
|
|
@ -567,7 +567,7 @@ void PANEL_PACKAGES_VIEW::OnVersionActionClicked( wxCommandEvent& event )
|
||||||
return ver.version == version;
|
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
|
if( !ver_it->compatible
|
||||||
&& wxMessageBox( _( "This package version is incompatible with your kicad version or "
|
&& wxMessageBox( _( "This package version is incompatible with your kicad version or "
|
||||||
|
|
Loading…
Reference in New Issue