From adac4331030a6d5623b72b18addad18d42a8f034 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 17 Aug 2022 09:29:04 +0200 Subject: [PATCH] Fix a Coverity warning --- qa/unittests/eeschema/test_netlist_exporter_spice.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qa/unittests/eeschema/test_netlist_exporter_spice.cpp b/qa/unittests/eeschema/test_netlist_exporter_spice.cpp index 52486f061d..e90c9d81b4 100644 --- a/qa/unittests/eeschema/test_netlist_exporter_spice.cpp +++ b/qa/unittests/eeschema/test_netlist_exporter_spice.cpp @@ -64,7 +64,8 @@ public: TEST_NETLIST_EXPORTER_FIXTURE(), m_simulator( SPICE_SIMULATOR::CreateInstance( "ngspice" ) ), m_log( std::make_shared() ), - m_reporter( std::make_unique( m_log ) ) + m_reporter( std::make_unique( m_log ) ), + m_abort( false ) { } @@ -125,7 +126,8 @@ public: // Test if ngspice cannot run a simulation (missing code models). // in this case the log contains "MIF-ERROR" and/or "Error: circuit not parsed" // when the simulation is not run the spice command "linearize" crashes. - bool err_found = m_log->Find( wxT( "Error: circuit not parsed" ) ) != wxNOT_FOUND; + bool err_found = m_log->Find( wxT( "Error: circuit not parsed" ) ) != wxNOT_FOUND + || m_log->Find( wxT( "MIF-ERROR" ) ) != wxNOT_FOUND; if( err_found ) {