Commit ee2d44d6 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Removed compiler warnings.

parent 751872af
......@@ -227,12 +227,14 @@ bool is_lat_axis(const char *units, const char *stdname)
bool is_x_axis(const char *units, const char *stdname)
{
(void)units;
return (strcmp(stdname, "projection_x_coordinate") == 0);
}
bool is_y_axis(const char *units, const char *stdname)
{
(void)units;
return (strcmp(stdname, "projection_y_coordinate") == 0);
}
......
......@@ -142,7 +142,7 @@ char *cdiGribIterator_serialize(CdiIterator *super)
const char *path = cdiInputFile_getPath(me->file);
char *escapedPath = cdiEscapeSpaces(path);
char *result = (char *) Malloc(strlen(escapedPath) + 3 * sizeof(int) * CHAR_BIT/8);
sprintf(result, "%s %zu", escapedPath, me->fileOffset);
sprintf(result, "%s %zu", escapedPath, (size_t)me->fileOffset);
Free(escapedPath);
return result;
}
......
......@@ -141,7 +141,7 @@ int cgribexGetTsteptype(int timerange)
}
static
void cgribexGetGrid(stream_t *streamptr, int *isec2, double *fsec2, int *isec4, grid_t *grid, int iret)
void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, int iret)
{
bool compyinc = true;
int gridtype = cgribexGetGridType(isec2);
......@@ -354,7 +354,7 @@ void cgribexAddRecord(stream_t * streamptr, int param, int *isec1, int *isec2, d
record->tsteptype = (short)tsteptype;
grid_t *gridptr = (grid_t*) Malloc(sizeof(*gridptr));
cgribexGetGrid(streamptr, isec2, fsec2, isec4, gridptr, iret);
cgribexGetGrid(streamptr, isec2, isec4, gridptr, iret);
struct addIfNewRes gridAdded = cdiVlistAddGridIfNew(vlistID, gridptr, 0);
int gridID = gridAdded.Id;
......
......@@ -1849,7 +1849,7 @@ struct gribApiMsg {
};
static struct gribApiMsg
getGribApiCompTypeMsg(grib_handle *gh, int comptype, int gridsize)
getGribApiCompTypeMsg(int comptype, int gridsize)
{
const char *mesg;
size_t len;
......@@ -1940,8 +1940,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
if ( comptype )
{
struct gribApiMsg gaMsg
= getGribApiCompTypeMsg(gh, comptype, gridsize);
struct gribApiMsg gaMsg = getGribApiCompTypeMsg(comptype, gridsize);
size_t len = gaMsg.msgLen;
const char *mesg = gaMsg.msg;
GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
......@@ -2080,14 +2079,13 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
}
else
{
struct gribApiMsg gaMsg = getGribApiCompTypeMsg(gh, comptype, gridsize);
struct gribApiMsg gaMsg = getGribApiCompTypeMsg(comptype, gridsize);
len = gaMsg.msgLen;
mesg = gaMsg.msg;
}
GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
if ( lieee )
GRIB_CHECK(my_grib_set_long(gh, "precision",
datatype == DATATYPE_FLT64 ? 2 : 1), 0);
GRIB_CHECK(my_grib_set_long(gh, "precision", datatype == DATATYPE_FLT64 ? 2 : 1), 0);
break;
}
......@@ -2100,7 +2098,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
int ysize = gridInqYsize(gridID);
gridInqParamLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
&projflag, &scanflag);
&projflag, &scanflag);
static const char mesg[] = "lambert";
size_t len = sizeof (mesg) -1;
......@@ -2325,7 +2323,7 @@ void grib_verfiy_zaxis(int zaxisID, double sf)
*/
static
void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID, int levelID, int gcinit, int proddef_template_num)
void gribapiDefLevel(int editionNumber, grib_handle *gh, int zaxisID, int levelID, int gcinit, int proddef_template_num)
{
bool lbounds = false;
double dlevel1 = 0, dlevel2 = 0;
......@@ -2650,7 +2648,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
gribapiDefGrid((int)editionNumber, gh, gridID, comptype, lieee, datatype, nmiss, gc->init);
gribapiDefLevel((int)editionNumber, gh, param, zaxisID, levelID, gc->init, productDefinitionTemplate);
gribapiDefLevel((int)editionNumber, gh, zaxisID, levelID, gc->init, productDefinitionTemplate);
vlist_t *vlistptr = vlist_to_pointer(vlistID);
//if (!gc->init)
......
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