Skip to content

Commit

Permalink
Per #2506, second batch of commits to resolve SonarQube 'will never b…
Browse files Browse the repository at this point in the history
…e executed' bugs classified as major.
  • Loading branch information
JohnHalleyGotway committed Apr 5, 2023
1 parent ea2d6a8 commit dff64a7
Show file tree
Hide file tree
Showing 39 changed files with 0 additions and 260 deletions.
2 changes: 0 additions & 2 deletions src/libcode/vx_gis/dbf_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,6 @@ mlog << Error << "\nDbfFile::operator=(const DbfFile &) -> "

exit ( 1 );

return ( * this );

}


Expand Down
12 changes: 0 additions & 12 deletions src/libcode/vx_gis/shp_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ mlog << Error

exit ( 1 );

return ( * this );

}


Expand Down Expand Up @@ -325,8 +323,6 @@ if ( (n_read = ::read(fd, buf, shp_file_header_bytes)) != shp_file_header_bytes
<< "\n\n ShpFile::open(const char * path) -> trouble reading file header from shp file \""
<< path << "\"\n\n";

// exit ( 1 );

close();

return ( false );
Expand Down Expand Up @@ -358,13 +354,9 @@ if ( ! is_open() ) {

exit ( 1 );

// return ( false );

}


// if ( ! is_open() ) return ( -1 );

const int pos = ::lseek(fd, 0, SEEK_CUR);

if ( pos < 0 ) {
Expand Down Expand Up @@ -398,8 +390,6 @@ if ( ! is_open() ) {

exit ( 1 );

// return ( false );

}


Expand Down Expand Up @@ -432,8 +422,6 @@ if ( ! is_open() ) {

exit ( 1 );

// return ( false );

}

int n_read;
Expand Down
8 changes: 0 additions & 8 deletions src/libcode/vx_grid/goes_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ using namespace std;
#include "goes_grid.h"


////////////////////////////////////////////////////////////////////////


//static double lc_func(double lat, double Cone, const bool is_north);


////////////////////////////////////////////////////////////////////////


Expand Down Expand Up @@ -399,8 +393,6 @@ mlog << Error << "\nGoesImagerGrid::shift_right(int) -> "

exit ( 1 );

return;

}


Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_grid/lc_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,6 @@ mlog << Error << "\nLambertGrid::shift_right(int) -> "

exit ( 1 );

return;

}


Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_grid/merc_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,6 @@ mlog << Error << "\nMercatorGrid::shift_right(int) -> "

exit ( 1 );

return;

}


Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_grid/rot_latlon_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,6 @@ mlog << Error << "\nRotatedLatLonGrid::shift_right(int) -> "

exit ( 1 );

return;

}


Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_grid/semilatlon_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,6 @@ mlog << Error << "\nSemiLatLonGrid::shift_right(int) -> "

exit ( 1 );

return;

}


Expand Down
86 changes: 0 additions & 86 deletions src/libcode/vx_grid/st_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ using namespace std;
////////////////////////////////////////////////////////////////////////


// static double st_func (double lat, bool is_north_hemisphere);
// static double st_der_func (double lat, bool is_north_hemisphere);
//
// static double st_inv_func (double r, bool is_north_hemisphere);

static void reduce(double & angle);

static double stereographic_segment_area(double u0, double v0, double u1, double v1);
Expand Down Expand Up @@ -594,8 +589,6 @@ mlog << Error << "\nStereographicGrid::shift_right(int) -> "

exit ( 1 );

return;

}


Expand Down Expand Up @@ -879,34 +872,6 @@ set(data);
}


////////////////////////////////////////////////////////////////////////

/*
Grid::Grid(const StereoType2Data & data)
{
init_from_scratch();
set(data);
}
*/

////////////////////////////////////////////////////////////////////////

/*
Grid::Grid(const StereoType3Data & data)
{
init_from_scratch();
set(data);
}
*/

////////////////////////////////////////////////////////////////////////


Expand All @@ -932,54 +897,6 @@ return;
}


////////////////////////////////////////////////////////////////////////

/*
void Grid::set(const StereoType2Data & data)
{
clear();
rep = new StereographicGrid (data);
if ( !rep ) {
mlog << Error << "\nGrid::set(const StereoType2Data &) -> memory allocation error\n\n";
exit ( 1 );
}
return;
}
*/

////////////////////////////////////////////////////////////////////////

/*
void Grid::set(const StereoType3Data & data)
{
clear();
rep = new StereographicGrid (data);
if ( !rep ) {
mlog << Error << "\nGrid::set(const StereoType3Data &) -> memory allocation error\n\n";
exit ( 1 );
}
return;
}
*/

////////////////////////////////////////////////////////////////////////


Expand All @@ -991,7 +908,6 @@ Grid create_aligned_st(double lat_center, double lon_center,
{

Grid g_new;
// double alpha;
double r_center, r_previous;
double Qx, Qy;
double L;
Expand Down Expand Up @@ -1027,8 +943,6 @@ data.ny = ny;
// calculate orientation longitude
//

// alpha = stereographic_alpha(data.scale_lat, data.r_km, data.d_km);

r_center = st_func(lat_center, is_north);
r_previous = st_func(lat_previous, is_north);

Expand Down
12 changes: 0 additions & 12 deletions src/libcode/vx_ps/table_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ mlog << Error

exit ( 1 );

// init_from_scratch();
//
// assign(t);

}


Expand All @@ -94,12 +90,6 @@ mlog << Error

exit ( 1 );

// if ( this == &t ) returnt ( * this );
//
// assign(t);

return ( * this );

}


Expand Down Expand Up @@ -164,7 +154,6 @@ if ( (Nrows <= 0) || (Ncols <= 0) ) {

exit ( 1 );


}

int j;
Expand Down Expand Up @@ -263,7 +252,6 @@ if ( !Plot ) {

}


return;

}
Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_ps/vx_ps.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1943,8 +1943,6 @@ mlog << Error << "\ndefault_media() -> "

exit ( 1 );

return ( no_document_media );

}


Expand Down
10 changes: 0 additions & 10 deletions src/libcode/vx_pxm/pbm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ if ( (r < 0) || (r >= Nrows) || (c < 0) || (c >= Ncols) ) {

exit ( 1 );

// return ( 0 );

}

int j, n;
Expand Down Expand Up @@ -247,8 +245,6 @@ if ( (r < 0) || (r >= Nrows) || (c < 0) || (c >= Ncols) ) {

exit ( 1 );

// return;

}

value = (int) (color.red());
Expand Down Expand Up @@ -647,9 +643,6 @@ mlog << Error << "\nPbm::rotate(int) -> not yet implemented ... sorry\n\n";

exit ( 1 );


return;

}


Expand All @@ -665,9 +658,6 @@ mlog << Error << "\nPbm::autocrop() -> not yet implemented ... sorry\n\n";

exit ( 1 );


return;

}


Expand Down
4 changes: 0 additions & 4 deletions src/libcode/vx_pxm/pcm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -904,10 +904,6 @@ mlog << Error << "\nvoid Pcm::autocrop() -> not yet implemented\n\n";

exit ( 1 );



return;

}


Expand Down
3 changes: 0 additions & 3 deletions src/libcode/vx_pxm/ppm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,6 @@ mlog << Error << "\nvoid Ppm::autocrop() -> not yet implemented\n\n";

exit ( 1 );


return;

}


Expand Down
11 changes: 0 additions & 11 deletions src/libcode/vx_python3_utils/python3_dict.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ mlog << Error << "\nPython3_Dict::Python3_Dict(const Python3_Dict &) -> "

exit ( 1 );

return;

}


Expand All @@ -106,8 +104,6 @@ mlog << Error << "\nPython3_Dict(const Python3_Dict &) -> "

exit ( 1 );

return ( * this );

}


Expand Down Expand Up @@ -611,13 +607,6 @@ mlog << Error << "\nPython3_Dict::dump_dict_value() -> "

exit ( 1 );


//
// done
//

return;

}


Expand Down
Loading

0 comments on commit dff64a7

Please sign in to comment.