mirror of https://github.com/ecmwf/eccodes.git
Compiler warnings: Unused variables
This commit is contained in:
parent
52f6530493
commit
eb4bf8dea7
|
@ -359,7 +359,8 @@ static int unpack(grib_accessor* a, double* dvalues, float* fvalues, size_t* len
|
|||
double reference_value;
|
||||
long binary_scale_factor;
|
||||
long decimal_scale_factor;
|
||||
long j, count = 0;
|
||||
long j;
|
||||
// long count = 0;
|
||||
long *groupWidths = NULL, *groupLengths = NULL;
|
||||
long orderOfSPD = 0;
|
||||
long* SPD = 0;
|
||||
|
@ -456,7 +457,7 @@ static int unpack(grib_accessor* a, double* dvalues, float* fvalues, size_t* len
|
|||
&X[n]);
|
||||
for (j = 0; j < groupLengths[i]; j++) {
|
||||
X[n] += firstOrderValues[i];
|
||||
count++;
|
||||
// count++;
|
||||
n++;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
|||
long primary_len = 0, secondary_len = 0;
|
||||
double* primary_bitmap = NULL;
|
||||
double* secondary_bitmap = NULL;
|
||||
long i = 0, j = 0, on = 0, k = 0, m = 0;
|
||||
long i = 0, j = 0, k = 0, m = 0;
|
||||
double missing_value = 0, present_value = 0;
|
||||
long expand_by = 0;
|
||||
|
||||
|
@ -177,7 +177,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
|||
primary_bitmap[k++] = present_value;
|
||||
for (j = 0; j < expand_by; j++)
|
||||
secondary_bitmap[m++] = val[i + j];
|
||||
on++;
|
||||
//on++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
|||
|
||||
size_t i = 0;
|
||||
int ret = GRIB_SUCCESS;
|
||||
long hcount = 0, lcount = 0, hpos = 0, lup = 0, mmax = 0, n_vals = 0;
|
||||
// long lup = 0;
|
||||
long hcount = 0, lcount = 0, hpos = 0, mmax = 0, n_vals = 0;
|
||||
double* scals = NULL;
|
||||
/* double *pscals=NULL; */
|
||||
|
||||
|
@ -330,12 +331,12 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
|||
i = 0;
|
||||
|
||||
while (maxv > 0) {
|
||||
lup = mmax;
|
||||
// lup = mmax;
|
||||
if (sub_k >= 0) {
|
||||
for (hcount = 0; hcount < sub_k + 1; hcount++) {
|
||||
decode_float(grib_decode_unsigned_long(hres, &hpos, 8 * bytes));
|
||||
decode_float(grib_decode_unsigned_long(hres, &hpos, 8 * bytes));
|
||||
lup++;
|
||||
// lup++;
|
||||
}
|
||||
sub_k--;
|
||||
}
|
||||
|
@ -352,7 +353,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
|||
reference_value);
|
||||
if (mmax == 0)
|
||||
val[i - 1] = 0;
|
||||
lup++;
|
||||
// lup++;
|
||||
}
|
||||
|
||||
maxv--;
|
||||
|
|
|
@ -284,7 +284,8 @@ static int grib_load_smart_table(grib_context* c, const char* filename,
|
|||
{
|
||||
char line[1024] = {0,};
|
||||
FILE* f = NULL;
|
||||
int lineNumber, numberOfColumns, code;
|
||||
// int lineNumber;
|
||||
int numberOfColumns, code;
|
||||
|
||||
grib_context_log(c, GRIB_LOG_DEBUG, "Loading code table from %s", filename);
|
||||
|
||||
|
@ -313,14 +314,14 @@ static int grib_load_smart_table(grib_context* c, const char* filename,
|
|||
t->recomposed_name[2] = grib_context_strdup_persistent(c, recomposed_name);
|
||||
}
|
||||
|
||||
lineNumber = 0;
|
||||
// lineNumber = 0;
|
||||
while (fgets(line, sizeof(line) - 1, f)) {
|
||||
char* s = line;
|
||||
char* p;
|
||||
|
||||
line[strlen(line) - 1] = 0;
|
||||
|
||||
++lineNumber;
|
||||
// ++lineNumber;
|
||||
while (*s != '\0' && isspace(*s))
|
||||
s++;
|
||||
|
||||
|
|
|
@ -597,7 +597,8 @@ static grib_handle* grib_handle_new_multi(grib_context* c, unsigned char** data,
|
|||
long edition = 0;
|
||||
size_t seclen = 0;
|
||||
unsigned char* secbegin = 0;
|
||||
int secnum = 0, seccount = 0;
|
||||
int secnum = 0;
|
||||
// int seccount = 0;
|
||||
int err = 0, i = 0;
|
||||
grib_multi_support* gm = NULL;
|
||||
|
||||
|
@ -631,9 +632,9 @@ static grib_handle* grib_handle_new_multi(grib_context* c, unsigned char** data,
|
|||
secbegin = gm->sections[gm->section_number];
|
||||
seclen = gm->sections_length[gm->section_number];
|
||||
secnum = gm->section_number;
|
||||
seccount = 0;
|
||||
// seccount = 0;
|
||||
while (grib2_get_next_section((unsigned char*)message, olen, &secbegin, &seclen, &secnum, &err)) {
|
||||
seccount++;
|
||||
// seccount++;
|
||||
/*printf(" - %d - section %d length=%d\n",(int)seccount,(int)secnum,(int)seclen);*/
|
||||
|
||||
gm->sections[secnum] = secbegin;
|
||||
|
@ -716,7 +717,8 @@ static grib_handle* grib_handle_new_from_file_multi(grib_context* c, FILE* f, in
|
|||
long edition = 0;
|
||||
size_t seclen = 0;
|
||||
unsigned char* secbegin = 0;
|
||||
int secnum = 0, seccount = 0;
|
||||
int secnum = 0;
|
||||
// int seccount = 0;
|
||||
int err = 0, i = 0;
|
||||
grib_multi_support* gm = NULL;
|
||||
off_t gts_header_offset = 0;
|
||||
|
@ -784,9 +786,9 @@ static grib_handle* grib_handle_new_from_file_multi(grib_context* c, FILE* f, in
|
|||
secbegin = gm->sections[gm->section_number];
|
||||
seclen = gm->sections_length[gm->section_number];
|
||||
secnum = gm->section_number;
|
||||
seccount = 0;
|
||||
// seccount = 0;
|
||||
while (grib2_get_next_section((unsigned char*)data, olen, &secbegin, &seclen, &secnum, &err)) {
|
||||
seccount++;
|
||||
// seccount++;
|
||||
/*printf(" - %d - section %d length=%d\n",(int)seccount,(int)secnum,(int)seclen);*/
|
||||
|
||||
gm->sections[secnum] = secbegin;
|
||||
|
|
|
@ -92,7 +92,6 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
long* bitmap = NULL; /* bitmap array */
|
||||
size_t bmp_len = 0;
|
||||
double *data_values = 0, *lats = 0, *lons = 0;
|
||||
int n = 0;
|
||||
size_t size = 0, num_bytes = 0;
|
||||
long hasMissingValues = 0;
|
||||
|
||||
|
@ -239,7 +238,6 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
if (print_keys)
|
||||
print_key_values(values, options->print_keys_count);
|
||||
fprintf(dump_file, "\n");
|
||||
n++;
|
||||
}
|
||||
}
|
||||
else if (skip_missing == 1) {
|
||||
|
@ -259,7 +257,6 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
if (print_keys)
|
||||
print_key_values(values, options->print_keys_count);
|
||||
fprintf(dump_file, "\n");
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1607,7 +1607,6 @@ static void cube_indexes(
|
|||
int i = 0;
|
||||
int index = 0;
|
||||
int n = 1;
|
||||
int ok = 0;
|
||||
|
||||
if (size < c) {
|
||||
grib_context_log(ctx, GRIB_LOG_ERROR, "Internal error in cube_indexes. size=%d < axis=%d", size, c);
|
||||
|
@ -1649,7 +1648,6 @@ static void cube_indexes(
|
|||
if (h->compare ? h->compare[i](w, v) : (w == v)) {
|
||||
index += j * n;
|
||||
n *= dims;
|
||||
ok++;
|
||||
((hypercube*)h)->index_cache[i] = j;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue