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

Fix gcc warnings.

parent 7e58f71a
......@@ -421,7 +421,6 @@ Expr(void *process)
operatorInputArg(cdoOperatorEnter(operatorID));
auto exprArgc = operatorArgc();
const auto exprArgv = cdoGetOperArgv();
auto exprs = readsCommandLine ? exprsFromArgument(exprArgv) : exprsFromFile(exprArgv);
......
......@@ -17,10 +17,8 @@
#include <cdi.h>
#include "cdo_options.h"
#include "process_int.h"
#include "color.h"
CPT cpt;
......
......@@ -80,7 +80,7 @@ magvector(const char *plotfile, int operatorID, const char *varname, long nlon,
{
fprintf(stderr, "Num params %ld\n", params.size());
for (i = 0; i < nparam; i++) fprintf(stderr, "Param %s\n", params[i]);
for (i = 0; i < nparam; i++) fprintf(stderr, "Param %s\n", params[i].c_str());
fflush(stderr);
}
......@@ -286,7 +286,7 @@ VerifyVectorParameters(int num_param, std::vector<std::string> &param_names, int
if (found && !syntax)
{
halt_flag = true;
fprintf(stderr, "Invalid parameter specification '%s'\n", param_names[i]);
fprintf(stderr, "Invalid parameter specification '%s'\n", param_names[i].c_str());
}
if (split_str) Free(split_str);
......
......@@ -424,6 +424,7 @@ scaleGridboxArea(size_t gridsize, const double *restrict array1, size_t gridsize
static int
set_remapgrids(int filetype, int vlistID, int ngrids, std::vector<bool> &remapgrids)
{
(void)filetype;
int index;
for (index = 0; index < ngrids; index++)
{
......
......@@ -130,7 +130,7 @@ Selgridcell(void *process)
nind = n;
if (nind == 0) cdoAbort("Index file %s generates no input!", cdoOperatorArgv(0).c_str());
}
else
else if (maskfile)
{
bool *cdo_read_mask(const char *maskfile, size_t *n);
size_t n = 0;
......
......@@ -217,8 +217,8 @@ DestaggerUV()
size_t gridsize;
int chcodes[MAXARG];
const char *chvars[MAXARG];
char varname[CDI_MAX_NAME];
double destagGridOffsets[MAXARG];
char varname[CDI_MAX_NAME];
int gridID1 = CDI_UNDEFID, gridID2 = CDI_UNDEFID;
int gridID0 = CDI_UNDEFID;
int gridID;
......@@ -228,6 +228,11 @@ DestaggerUV()
Varray<double> ivar, ovar;
double dxU = 0, dyU = 0, dxV = 0, dyV = 0;
chcodes[0] = 0;
chcodes[1] = 0;
chvars[0] = 0;
chvars[1] = 0;
// Note: Already initialized by the caller! Don't call again:
// cdoInitialize(process);
......
......@@ -127,6 +127,7 @@ struct scrip_grid {
static unsigned get_num_cell_corners_scrip (struct grid * grid, unsigned cell_index) {
(void) cell_index;
struct scrip_grid * scrip_grid = (struct scrip_grid *)grid;
return scrip_grid->max_corners;
......@@ -285,7 +286,8 @@ static struct grid_search * get_grid_search_scrip(struct grid * grid) {
return scrip_grid->grid_search;
}
static int cell_contains_non_gc_edge_scrip(
struct grid * grid, unsigned local_cell_id) {
static int cell_contains_non_gc_edge_scrip(struct grid * grid, unsigned local_cell_id) {
(void)grid;
(void)local_cell_id;
return 0;
}
Supports Markdown
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