Commit 76ff464a authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix signed overflow warnings.

parent 6bf28484
......@@ -7865,12 +7865,21 @@ int cdfInqContents(stream_t *streamptr)
calendar = CALENDAR_STANDARD;
}
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
#pragma GCC diagnostic push
#endif
#ifdef __GNUC__
#pragma GCC diagnostic warning "-Wstrict-overflow"
#endif
if ( calendar != UNDEFID )
{
taxis_t *taxis = &streamptr->tsteps[0].taxis;
taxis->calendar = calendar;
taxisDefCalendar(taxisID, calendar);
}
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
#pragma GCC diagnostic pop
#endif
vlistDefTaxis(vlistID, taxisID);
......
......@@ -827,7 +827,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
int fileID = streamptr->fileID;
int nrecs = 0;
unsigned nrecs = 0;
while ( TRUE )
{
int level1 = 0, level2 = 0;
......@@ -921,7 +921,7 @@ int gribapiScanTimestep1(stream_t * streamptr)
{
char paramstr[32];
cdiParamToString(param, paramstr, sizeof(paramstr));
Message("%4d %8d name=%s id=%s ltype=%d lev1=%d lev2=%d vdate=%d vtime=%d",
Message("%4u %8d name=%s id=%s ltype=%d lev1=%d lev2=%d vdate=%d vtime=%d",
nrecs, (int)recpos, varname, paramstr, leveltype1, level1, level2, vdate, vtime);
}
......
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