diff --git a/nestkernel/connection_creator_impl.h b/nestkernel/connection_creator_impl.h index 7aa224347f..e094ab59d5 100644 --- a/nestkernel/connection_creator_impl.h +++ b/nestkernel/connection_creator_impl.h @@ -167,7 +167,7 @@ ConnectionCreator::PoolWrapper_< D >::PoolWrapper_() } template < int D > -ConnectionCreator::PoolWrapper_< D >::~PoolWrapper_() +ConnectionCreator::PoolWrapper_< D >::~PoolWrapper_< D >() { if ( masked_layer_ ) { diff --git a/sli/parser.h b/sli/parser.h index dc5d67aae9..79f70bcba4 100644 --- a/sli/parser.h +++ b/sli/parser.h @@ -38,7 +38,7 @@ class Parser { - Scanner* s; + Scanner* s = nullptr; Token arraytoken; Token proctoken; @@ -61,6 +61,10 @@ class Parser public: Parser(); Parser( std::istream& ); + ~Parser() + { + delete s; + } bool operator()( Token& ); bool diff --git a/sli/slistartup.cc b/sli/slistartup.cc index 61dcd706cb..a090c701f9 100644 --- a/sli/slistartup.cc +++ b/sli/slistartup.cc @@ -214,53 +214,55 @@ SLIStartup::SLIStartup( int argc, char** argv ) StringDatum* sd = new StringDatum( argv[ i ] ); args_array.push_back( Token( sd ) ); - if ( *sd == "-d" or *sd == "--debug" ) + const std::string myarg = argv[ i ]; + + if ( myarg == "-d" or myarg == "--debug" ) { debug_ = true; verbosity_ = SLIInterpreter::M_ALL; // make the interpreter verbose. continue; } - if ( *sd == "--verbosity=ALL" ) + if ( myarg == "--verbosity=ALL" ) { verbosity_ = SLIInterpreter::M_ALL; continue; } - if ( *sd == "--verbosity=DEBUG" ) + if ( myarg == "--verbosity=DEBUG" ) { verbosity_ = SLIInterpreter::M_DEBUG; continue; } - if ( *sd == "--verbosity=STATUS" ) + if ( myarg == "--verbosity=STATUS" ) { verbosity_ = SLIInterpreter::M_STATUS; continue; } - if ( *sd == "--verbosity=INFO" ) + if ( myarg == "--verbosity=INFO" ) { verbosity_ = SLIInterpreter::M_INFO; continue; } - if ( *sd == "--verbosity=DEPRECATED" ) + if ( myarg == "--verbosity=DEPRECATED" ) { verbosity_ = SLIInterpreter::M_DEPRECATED; continue; } - if ( *sd == "--verbosity=WARNING" ) + if ( myarg == "--verbosity=WARNING" ) { verbosity_ = SLIInterpreter::M_WARNING; continue; } - if ( *sd == "--verbosity=ERROR" ) + if ( myarg == "--verbosity=ERROR" ) { verbosity_ = SLIInterpreter::M_ERROR; continue; } - if ( *sd == "--verbosity=FATAL" ) + if ( myarg == "--verbosity=FATAL" ) { verbosity_ = SLIInterpreter::M_FATAL; continue; } - if ( *sd == "--verbosity=QUIET" ) + if ( myarg == "--verbosity=QUIET" ) { verbosity_ = SLIInterpreter::M_QUIET; continue;