Commit 8a0fe23e authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added warn_unused to struct GridDesciption.

parent bbb55def
......@@ -23,7 +23,6 @@
#include <cdi.h>
#include "cdo_options.h"
#include "dmemory.h"
#include "process_int.h"
#include "cdo_cdi_wrapper.h"
#include "griddes.h"
......@@ -505,7 +504,7 @@ cdoDefineGrid(const char *pgridfile)
if (gridID == -1) cdoAbort("Invalid grid description file %s!", filename);
}
if (lalloc) Free(filename);
if (lalloc) free(filename);
free(gridfile);
return gridID;
......
......@@ -23,7 +23,11 @@
constexpr double undef_grid_value = 9.e20;
struct GridDesciption
struct // GridDesciption
#ifdef __GNUG__
__attribute__((warn_unused))
#endif
GridDesciption
{
std::vector<int> mask;
std::vector<double> xvals;
......@@ -35,7 +39,7 @@ struct GridDesciption
double xfirst = undef_grid_value, yfirst = undef_grid_value;
double xlast = undef_grid_value, ylast = undef_grid_value;
double xinc = undef_grid_value, yinc = undef_grid_value;
double xpole = 0, ypole = 0, angle = 0; // rotated north pole
double xpole = 0.0, ypole = 0.0, angle = 0.0; // rotated north pole
int scanningMode = 64;
/*
scanningMode = 128 * iScansNegatively + 64 * jScansPositively + 32 * jPointsAreConsecutive;
......@@ -44,7 +48,7 @@ struct GridDesciption
96 = 128 * 0 + 64 * 1 + 32 * 1
Default implicit scanning mode is 64: i and j scan positively, i points are consecutive (row-major)
*/
double a = 0;
double a = 0.0;
int isRotated = 0; // true for rotated grids
int datatype = CDI_UNDEFID;
int type = CDI_UNDEFID;
......
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