Browse Source

Minor Coverity and compil warnings fixes.

newinvert
jean-pierre charras 2 years ago
parent
commit
3a4f3cb0b8
  1. 4
      eeschema/sim/legacy_workbook.cpp
  2. 8
      eeschema/sim/simulator_frame_ui.cpp
  3. 3
      include/hotkey_store.h
  4. 2
      plugins/3d/idf/s3d_plugin_idf.cpp

4
eeschema/sim/legacy_workbook.cpp

@ -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() );
}
}

8
eeschema/sim/simulator_frame_ui.cpp

@ -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(

3
include/hotkey_store.h

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

2
plugins/3d/idf/s3d_plugin_idf.cpp

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

Loading…
Cancel
Save