Skip to content
Snippets Groups Projects
Commit d116e544 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Fix compiler warnings

parent f340522c
No related branches found
No related tags found
1 merge request!118M214003/develop
...@@ -68,8 +68,6 @@ get_date(const char *name) ...@@ -68,8 +68,6 @@ get_date(const char *name)
class ModuleImportobs class ModuleImportobs
{ {
char line[MAX_LINE_LEN]; char line[MAX_LINE_LEN];
size_t i, j;
long index;
int nvars = 6; int nvars = 6;
int vtime = 0; int vtime = 0;
char dummy[32], station[32], datetime[32]; char dummy[32], station[32], datetime[32];
...@@ -144,12 +142,13 @@ public: ...@@ -144,12 +142,13 @@ public:
taxisID = cdo_taxis_create(TAXIS_ABSOLUTE); taxisID = cdo_taxis_create(TAXIS_ABSOLUTE);
vlistDefTaxis(vlistID, taxisID); vlistDefTaxis(vlistID, taxisID);
data = Varray2D<double>(nvars); data = Varray2D<double>(nvars);
for (i = 0; i < nvars; ++i) data[i].resize(gridsize); for (int i = 0; i < nvars; ++i) data[i].resize(gridsize);
init_vars(vlistID, gridID, zaxisID, nvars); init_vars(vlistID, gridID, zaxisID, nvars);
cdo_def_vlist(streamID, vlistID); cdo_def_vlist(streamID, vlistID);
} }
void void
run() run()
{ {
...@@ -189,15 +188,17 @@ public: ...@@ -189,15 +188,17 @@ public:
if (lat > latmax) latmax = lat; if (lat > latmax) latmax = lat;
auto dy = yvals[1] - yvals[0]; auto dy = yvals[1] - yvals[0];
size_t j;
for (j = 0; j < ysize; ++j) for (j = 0; j < ysize; ++j)
if (lat >= (yvals[j] - dy / 2) && lat < (yvals[j] + dy / 2)) break; if (lat >= (yvals[j] - dy / 2) && lat < (yvals[j] + dy / 2)) break;
auto dx = xvals[1] - xvals[0]; auto dx = xvals[1] - xvals[0];
if (lon < (xvals[0] - dx / 2) && lon < 0) lon += 360; if (lon < (xvals[0] - dx / 2) && lon < 0) lon += 360;
size_t i;
for (i = 0; i < xsize; ++i) for (i = 0; i < xsize; ++i)
if (lon >= (xvals[i] - dx / 2) && lon < (xvals[i] + dx / 2)) break; if (lon >= (xvals[i] - dx / 2) && lon < (xvals[i] + dx / 2)) break;
index = -1; long index = -1;
if (code == 11) index = 0; if (code == 11) index = 0;
if (code == 17) index = 1; if (code == 17) index = 1;
if (code == 33) index = 2; if (code == 33) index = 2;
...@@ -226,6 +227,7 @@ public: ...@@ -226,6 +227,7 @@ public:
process_def_var_num(vlistNvars(vlistID)); process_def_var_num(vlistNvars(vlistID));
} }
void void
close() close()
{ {
...@@ -241,6 +243,7 @@ public: ...@@ -241,6 +243,7 @@ public:
cdo_finish(); cdo_finish();
} }
}; };
void * void *
Importobs(void *process) Importobs(void *process)
{ {
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
class ModuleSplitdate class ModuleSplitdate
{ {
int noffset;
CdoStreamID streamID1; CdoStreamID streamID1;
int taxisID1; int taxisID1;
...@@ -103,6 +101,7 @@ public: ...@@ -103,6 +101,7 @@ public:
} }
} }
} }
void void
run() run()
{ {
...@@ -209,6 +208,7 @@ public: ...@@ -209,6 +208,7 @@ public:
tsID2++; tsID2++;
} }
} }
void void
close() close()
{ {
...@@ -229,5 +229,6 @@ Splitdate(void *process) ...@@ -229,5 +229,6 @@ Splitdate(void *process)
splitdate.init(process); splitdate.init(process);
splitdate.run(); splitdate.run();
splitdate.close(); splitdate.close();
return nullptr; return nullptr;
} }
...@@ -261,7 +261,7 @@ int jsmn_parse(jsmn_parser *parser, const char *js, size_t len) ...@@ -261,7 +261,7 @@ int jsmn_parse(jsmn_parser *parser, const char *js, size_t len)
break; break;
case '\r': case '\r':
if ( parser->pos+1 < len && js[parser->pos+1] == '\n' ) parser->pos++; if ( parser->pos+1 < len && js[parser->pos+1] == '\n' ) parser->pos++;
// C++17 [[fallthrough]]; // C++20 [[fallthrough]];
case '\n': case '\n':
parser->lineno++; parser->lineno++;
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment