Minor Coverity and compil warnings fixes.

This commit is contained in:
jean-pierre charras 2023-07-17 16:19:22 +02:00
parent c009328c07
commit 3a4f3cb0b8
4 changed files with 9 additions and 8 deletions

View File

@ -339,7 +339,9 @@ bool SIMULATOR_FRAME_UI::loadLegacyWorkbook( const wxString& aPath )
if( version >= 5 )
{
simTab = dynamic_cast<SIM_TAB*>( m_plotNotebook->GetPage( 0 ) );
simTab->SetLastSchTextSimCommand( file.GetNextLine() );
if( simTab )
simTab->SetLastSchTextSimCommand( file.GetNextLine() );
}
}

View File

@ -1970,16 +1970,16 @@ bool SIMULATOR_FRAME_UI::SaveWorkbook( const wxString& aPath )
int options = simTab->GetSimOptions();
if( simTab->GetSimOptions() & NETLIST_EXPORTER_SPICE::OPTION_ADJUST_INCLUDE_PATHS )
if( options & NETLIST_EXPORTER_SPICE::OPTION_ADJUST_INCLUDE_PATHS )
commands_js.push_back( ".kicad adjustpaths" );
if( simTab->GetSimOptions() & NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES )
if( options & NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES )
commands_js.push_back( ".save all" );
if( simTab->GetSimOptions() & NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_CURRENTS )
if( options & NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_CURRENTS )
commands_js.push_back( ".probe alli" );
if( simTab->GetSimOptions() & NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_DISSIPATIONS )
if( options & NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_DISSIPATIONS )
commands_js.push_back( ".probe allp" );
nlohmann::json tab_js = nlohmann::json(

View File

@ -38,7 +38,8 @@ struct HOTKEY
int m_EditKeycodeAlt;
HOTKEY() :
m_EditKeycode( 0 )
m_EditKeycode( 0 ),
m_EditKeycodeAlt( 0 )
{ }
HOTKEY( TOOL_ACTION* aAction ) :

View File

@ -24,8 +24,6 @@
// Note: the board's bottom side is at Z = 0
#include <iostream>
#include <sstream>
#include <cmath>
#include <string>
#include <map>