Commit f2edf02b authored by Wayne Stambaugh's avatar Wayne Stambaugh

Coverity error fixes.

* Fix unitialized variable in MSG_PANEL_ITEM default ctor.
* Fix a bunch of uncaught exception issues.
* Fix a memory leak in the NETLIST_READER::GetNetlistReader() when an
  an attempt to read an invalid net list file occurs.
parent b0ad779e
...@@ -71,7 +71,8 @@ public: ...@@ -71,7 +71,8 @@ public:
{ {
} }
MSG_PANEL_ITEM() MSG_PANEL_ITEM() :
m_Pad( MSG_PANEL_DEFAULT_PAD )
{ {
} }
......
...@@ -379,7 +379,7 @@ void GITHUB_PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const ...@@ -379,7 +379,7 @@ void GITHUB_PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
} }
void GITHUB_PLUGIN::cacheLib( const wxString& aLibraryPath, const PROPERTIES* aProperties ) throw( IO_ERROR ) void GITHUB_PLUGIN::cacheLib( const wxString& aLibraryPath, const PROPERTIES* aProperties )
{ {
// This is edge triggered based on a change in 'aLibraryPath', // This is edge triggered based on a change in 'aLibraryPath',
// usually it does nothing. When the edge fires, m_pretty_dir is set // usually it does nothing. When the edge fires, m_pretty_dir is set
......
...@@ -200,7 +200,7 @@ protected: ...@@ -200,7 +200,7 @@ protected:
void init( const PROPERTIES* aProperties ); void init( const PROPERTIES* aProperties );
void cacheLib( const wxString& aLibraryPath, const PROPERTIES* aProperties ) throw( IO_ERROR ); void cacheLib( const wxString& aLibraryPath, const PROPERTIES* aProperties );
/** /**
* Function repoURL_zipURL * Function repoURL_zipURL
......
...@@ -126,9 +126,9 @@ NETLIST_READER* NETLIST_READER::GetNetlistReader( NETLIST* aNetlist, ...@@ -126,9 +126,9 @@ NETLIST_READER* NETLIST_READER::GetNetlistReader( NETLIST* aNetlist,
default: // Unrecognized format: default: // Unrecognized format:
break; break;
} }
delete cmpFileReader;
return NULL; return NULL;
} }
......
...@@ -602,7 +602,8 @@ void SPECCTRA_DB::doLAYER_PAIR( LAYER_PAIR* growth ) throw( IO_ERROR ) ...@@ -602,7 +602,8 @@ void SPECCTRA_DB::doLAYER_PAIR( LAYER_PAIR* growth ) throw( IO_ERROR )
} }
void SPECCTRA_DB::doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth )
throw( IO_ERROR, boost::bad_pointer )
{ {
T tok; T tok;
...@@ -755,7 +756,7 @@ L_place: ...@@ -755,7 +756,7 @@ L_place:
} }
void SPECCTRA_DB::doSTRUCTURE_OUT( STRUCTURE_OUT* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doSTRUCTURE_OUT( STRUCTURE_OUT* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
/* /*
<structure_out_descriptor >::= <structure_out_descriptor >::=
...@@ -1862,7 +1863,7 @@ void SPECCTRA_DB::doPLACE( PLACE* growth ) throw( IO_ERROR ) ...@@ -1862,7 +1863,7 @@ void SPECCTRA_DB::doPLACE( PLACE* growth ) throw( IO_ERROR )
} }
void SPECCTRA_DB::doCOMPONENT( COMPONENT* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doCOMPONENT( COMPONENT* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok = NextTok(); T tok = NextTok();
...@@ -2130,7 +2131,7 @@ L_done_that: ...@@ -2130,7 +2131,7 @@ L_done_that:
} }
void SPECCTRA_DB::doIMAGE( IMAGE* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doIMAGE( IMAGE* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok = NextTok(); T tok = NextTok();
...@@ -2327,7 +2328,7 @@ void SPECCTRA_DB::doLIBRARY( LIBRARY* growth ) throw( IO_ERROR ) ...@@ -2327,7 +2328,7 @@ void SPECCTRA_DB::doLIBRARY( LIBRARY* growth ) throw( IO_ERROR )
} }
void SPECCTRA_DB::doNET( NET* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doNET( NET* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok = NextTok(); T tok = NextTok();
PIN_REFS* pin_refs; PIN_REFS* pin_refs;
...@@ -2615,7 +2616,7 @@ void SPECCTRA_DB::doCLASS( CLASS* growth ) throw( IO_ERROR ) ...@@ -2615,7 +2616,7 @@ void SPECCTRA_DB::doCLASS( CLASS* growth ) throw( IO_ERROR )
} }
void SPECCTRA_DB::doNETWORK( NETWORK* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doNETWORK( NETWORK* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok; T tok;
...@@ -2764,7 +2765,7 @@ void SPECCTRA_DB::doFROMTO( FROMTO* growth ) throw( IO_ERROR ) ...@@ -2764,7 +2765,7 @@ void SPECCTRA_DB::doFROMTO( FROMTO* growth ) throw( IO_ERROR )
} }
void SPECCTRA_DB::doWIRE( WIRE* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doWIRE( WIRE* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok; T tok;
...@@ -3083,7 +3084,7 @@ void SPECCTRA_DB::doANCESTOR( ANCESTOR* growth ) throw( IO_ERROR ) ...@@ -3083,7 +3084,7 @@ void SPECCTRA_DB::doANCESTOR( ANCESTOR* growth ) throw( IO_ERROR )
} }
void SPECCTRA_DB::doHISTORY( HISTORY* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doHISTORY( HISTORY* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok; T tok;
...@@ -3257,7 +3258,7 @@ void SPECCTRA_DB::doWAS_IS( WAS_IS* growth ) throw( IO_ERROR ) ...@@ -3257,7 +3258,7 @@ void SPECCTRA_DB::doWAS_IS( WAS_IS* growth ) throw( IO_ERROR )
} }
void SPECCTRA_DB::doROUTE( ROUTE* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doROUTE( ROUTE* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok; T tok;
...@@ -3340,7 +3341,7 @@ void SPECCTRA_DB::doROUTE( ROUTE* growth ) throw( IO_ERROR ) ...@@ -3340,7 +3341,7 @@ void SPECCTRA_DB::doROUTE( ROUTE* growth ) throw( IO_ERROR )
} }
void SPECCTRA_DB::doNET_OUT( NET_OUT* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doNET_OUT( NET_OUT* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok; T tok;
......
...@@ -3695,8 +3695,8 @@ class SPECCTRA_DB : public SPECCTRA_LEXER ...@@ -3695,8 +3695,8 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
void doRESOLUTION( UNIT_RES* growth ) throw( IO_ERROR ); void doRESOLUTION( UNIT_RES* growth ) throw( IO_ERROR );
void doUNIT( UNIT_RES* growth ) throw( IO_ERROR ); void doUNIT( UNIT_RES* growth ) throw( IO_ERROR );
void doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR ); void doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR );
void doSTRUCTURE_OUT( STRUCTURE_OUT* growth ) throw( IO_ERROR ); void doSTRUCTURE_OUT( STRUCTURE_OUT* growth ) throw( IO_ERROR, boost::bad_pointer );
void doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth ) throw( IO_ERROR ); void doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth ) throw( IO_ERROR, boost::bad_pointer );
void doLAYER_PAIR( LAYER_PAIR* growth ) throw( IO_ERROR ); void doLAYER_PAIR( LAYER_PAIR* growth ) throw( IO_ERROR );
void doBOUNDARY( BOUNDARY* growth ) throw( IO_ERROR ); void doBOUNDARY( BOUNDARY* growth ) throw( IO_ERROR );
void doRECTANGLE( RECTANGLE* growth ) throw( IO_ERROR ); void doRECTANGLE( RECTANGLE* growth ) throw( IO_ERROR );
...@@ -3718,29 +3718,29 @@ class SPECCTRA_DB : public SPECCTRA_LEXER ...@@ -3718,29 +3718,29 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
void doCLASSES( CLASSES* growth ) throw( IO_ERROR ); void doCLASSES( CLASSES* growth ) throw( IO_ERROR );
void doGRID( GRID* growth ) throw( IO_ERROR ); void doGRID( GRID* growth ) throw( IO_ERROR );
void doPLACE( PLACE* growth ) throw( IO_ERROR ); void doPLACE( PLACE* growth ) throw( IO_ERROR );
void doCOMPONENT( COMPONENT* growth ) throw( IO_ERROR ); void doCOMPONENT( COMPONENT* growth ) throw( IO_ERROR, boost::bad_pointer );
void doPLACEMENT( PLACEMENT* growth ) throw( IO_ERROR ); void doPLACEMENT( PLACEMENT* growth ) throw( IO_ERROR );
void doPROPERTIES( PROPERTIES* growth ) throw( IO_ERROR ); void doPROPERTIES( PROPERTIES* growth ) throw( IO_ERROR );
void doPADSTACK( PADSTACK* growth ) throw( IO_ERROR ); void doPADSTACK( PADSTACK* growth ) throw( IO_ERROR );
void doSHAPE( SHAPE* growth ) throw( IO_ERROR ); void doSHAPE( SHAPE* growth ) throw( IO_ERROR );
void doIMAGE( IMAGE* growth ) throw( IO_ERROR ); void doIMAGE( IMAGE* growth ) throw( IO_ERROR, boost::bad_pointer );
void doLIBRARY( LIBRARY* growth ) throw( IO_ERROR ); void doLIBRARY( LIBRARY* growth ) throw( IO_ERROR );
void doPIN( PIN* growth ) throw( IO_ERROR ); void doPIN( PIN* growth ) throw( IO_ERROR );
void doNET( NET* growth ) throw( IO_ERROR ); void doNET( NET* growth ) throw( IO_ERROR, boost::bad_pointer );
void doNETWORK( NETWORK* growth ) throw( IO_ERROR ); void doNETWORK( NETWORK* growth ) throw( IO_ERROR, boost::bad_pointer );
void doCLASS( CLASS* growth ) throw( IO_ERROR ); void doCLASS( CLASS* growth ) throw( IO_ERROR );
void doTOPOLOGY( TOPOLOGY* growth ) throw( IO_ERROR ); void doTOPOLOGY( TOPOLOGY* growth ) throw( IO_ERROR );
void doFROMTO( FROMTO* growth ) throw( IO_ERROR ); void doFROMTO( FROMTO* growth ) throw( IO_ERROR );
void doCOMP_ORDER( COMP_ORDER* growth ) throw( IO_ERROR ); void doCOMP_ORDER( COMP_ORDER* growth ) throw( IO_ERROR );
void doWIRE( WIRE* growth ) throw( IO_ERROR ); void doWIRE( WIRE* growth ) throw( IO_ERROR, boost::bad_pointer );
void doWIRE_VIA( WIRE_VIA* growth ) throw( IO_ERROR ); void doWIRE_VIA( WIRE_VIA* growth ) throw( IO_ERROR );
void doWIRING( WIRING* growth ) throw( IO_ERROR ); void doWIRING( WIRING* growth ) throw( IO_ERROR );
void doSESSION( SESSION* growth ) throw( IO_ERROR ); void doSESSION( SESSION* growth ) throw( IO_ERROR );
void doANCESTOR( ANCESTOR* growth ) throw( IO_ERROR ); void doANCESTOR( ANCESTOR* growth ) throw( IO_ERROR );
void doHISTORY( HISTORY* growth ) throw( IO_ERROR ); void doHISTORY( HISTORY* growth ) throw( IO_ERROR, boost::bad_pointer );
void doROUTE( ROUTE* growth ) throw( IO_ERROR ); void doROUTE( ROUTE* growth ) throw( IO_ERROR, boost::bad_pointer );
void doWAS_IS( WAS_IS* growth ) throw( IO_ERROR ); void doWAS_IS( WAS_IS* growth ) throw( IO_ERROR );
void doNET_OUT( NET_OUT* growth ) throw( IO_ERROR ); void doNET_OUT( NET_OUT* growth ) throw( IO_ERROR, boost::bad_pointer );
void doSUPPLY_PIN( SUPPLY_PIN* growth ) throw( IO_ERROR ); void doSUPPLY_PIN( SUPPLY_PIN* growth ) throw( IO_ERROR );
//-----<FromBOARD>------------------------------------------------------- //-----<FromBOARD>-------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment