Skip to content

Commit

Permalink
Per #2506, first batch of commits to resolve SonarQube 'will never be…
Browse files Browse the repository at this point in the history
… executed' bugs classified as major.
  • Loading branch information
JohnHalleyGotway committed Apr 5, 2023
1 parent a33aa0a commit ea2d6a8
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 127 deletions.
2 changes: 0 additions & 2 deletions src/basic/enum_to_string/enum_to_string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,6 @@ if ( debug ) {

exit ( 1 );

return;

}


Expand Down
5 changes: 0 additions & 5 deletions src/basic/vx_config/config.tab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2268,8 +2268,6 @@ mlog << Error

exit ( 1 );

return;

}


Expand Down Expand Up @@ -2320,8 +2318,6 @@ switch ( op ) {
default:
cerr << "\n\n do_op() -> unrecognized op ... \"" << op << "\"\n\n";
exit ( 1 );
break;


} // switch

Expand Down Expand Up @@ -2371,7 +2367,6 @@ switch ( op ) {
mlog << Error << "\ndo_integer_op() -> "
<< "bad operator ... \"" << op << "\"\n\n";
exit ( 1 );
break;

}

Expand Down
5 changes: 0 additions & 5 deletions src/basic/vx_config/config.tab.yy
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,6 @@ mlog << Error

exit ( 1 );

return;

}


Expand Down Expand Up @@ -528,8 +526,6 @@ switch ( op ) {
default:
cerr << "\n\n do_op() -> unrecognized op ... \"" << op << "\"\n\n";
exit ( 1 );
break;


} // switch

Expand Down Expand Up @@ -579,7 +575,6 @@ switch ( op ) {
mlog << Error << "\ndo_integer_op() -> "
<< "bad operator ... \"" << op << "\"\n\n";
exit ( 1 );
break;

}

Expand Down
6 changes: 0 additions & 6 deletions src/basic/vx_config/dictionary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2417,18 +2417,12 @@ DictionaryStack & DictionaryStack::operator=(const DictionaryStack & s)

{

// if ( this == &s ) return ( * this );
//
// assign(s);

mlog << Error
<< "\nDictionaryStack::operator=(const DictionaryStack &) -> "
<< "should never be called!\n\n";

exit ( 1 );

return ( * this );

}


Expand Down
2 changes: 0 additions & 2 deletions src/basic/vx_log/logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,6 @@ Logger & Logger::operator=(const Logger & l)
cerr << "\n\n operator=(const Logger & l) -> This function should never be called\n\n";
exit (1);

return (*this); // left in to keep the compiler quiet

}


Expand Down
2 changes: 0 additions & 2 deletions src/basic/vx_math/pwl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,6 @@ mlog << Error << "\nPiecewiseLinear::operator()(double) -> error in \""

exit ( 1 );

return ( -100 ); // just to satisfy the compiler

}


Expand Down
5 changes: 0 additions & 5 deletions src/basic/vx_util/command_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,8 @@ else {

}


exit ( 1 );

return;

}


Expand Down Expand Up @@ -893,8 +890,6 @@ cout << "\n";

exit ( 1 );

return;

}


Expand Down
3 changes: 0 additions & 3 deletions src/basic/vx_util/data_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,6 @@ mlog << Error << "\nLineDataFile::operator=(const LineDataFile &) -> "

exit ( 1 );


return ( * this );

}


Expand Down
2 changes: 0 additions & 2 deletions src/basic/vx_util/memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ void oom() {
mlog << Error << "\nOut of memory! Exiting!\n\n";
exit(1);

return;
}

////////////////////////////////////////////////////////////////////////
Expand All @@ -39,7 +38,6 @@ void oom_grib2() {
<< "flag.\n\n";
exit(1);

return;
}

////////////////////////////////////////////////////////////////////////
2 changes: 0 additions & 2 deletions src/basic/vx_util/python_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,6 @@ if ( PyErr_Occurred() ) {

exit ( 1 );

return;

}

//
Expand Down
1 change: 0 additions & 1 deletion src/libcode/vx_bool_calc/bool_calc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ for (j=0; j<((int) P.size()); ++j) {
<< "bad token in program ... \n\n";
tok.dump(cerr, 1);
exit ( 1 );
break;

} // switch

Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_color/color_parser_yacc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2226,8 +2226,6 @@ cout.flush();

exit ( 1 );

return;

}


Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_color/color_parser_yacc.yy
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,6 @@ cout.flush();

exit ( 1 );

return;

}


Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_color/color_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,6 @@ mlog << Error << "\nColorTable::interp(double) const -> confused!\n\n";

exit ( 1 );

return ( black );

}


Expand Down
18 changes: 0 additions & 18 deletions src/libcode/vx_data2d_grib/data2d_grib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ mlog << Error << "\nMetGrib1DataFile::MetGrib1DataFile(const MetGrib1DataFile &)

exit ( 1 );

// grib1_init_from_scratch();
//
// assign(f);

}


Expand All @@ -97,12 +93,6 @@ mlog << Error << "\nMetGrib1DataFile::operator=(const MetGrib1DataFile &) -> "

exit ( 1 );

// if ( this == &f ) return ( * this );
//
// assign(f);

return ( * this );

}


Expand Down Expand Up @@ -160,8 +150,6 @@ if ( ! (GF->open(_filename)) ) {
mlog << Error << "\nMetGrib1DataFile::open(const char *) -> "
<< "unable to open grib1 file \"" << _filename << "\"\n\n";

// exit ( 1 );

close();

return ( false );
Expand Down Expand Up @@ -343,8 +331,6 @@ if ( !GF ) {
mlog << Error << "\nMetGrib1DataFile::read_record(const VarInfoGrib &) -> "
<< "no grib file open!\n\n";

// exit ( 1 );

return ( -1 );

}
Expand All @@ -363,8 +349,6 @@ for (j=0; j<(GF->n_records()); ++j) {

mlog << Error << "\nMetGrib1DataFile::read_record(const VarInfoGrib &) -> trouble reading record!\n\n";

// exit ( 1 );

return ( -1 );

}
Expand Down Expand Up @@ -404,8 +388,6 @@ if ( j_match >= 0 ) {
mlog << Error << "\nMetGrib1DataFile::read_record(const VarInfoGrib &) -> "
<< "trouble reading record!\n\n";

// exit ( 1 );

return ( -1 );

}
Expand Down
Loading

0 comments on commit ea2d6a8

Please sign in to comment.