Fix compiler warnings

This commit is contained in:
Shahram Najm 2024-02-19 17:14:32 +00:00
parent 54f385b897
commit 5918bee645
5 changed files with 8 additions and 8 deletions

View File

@ -409,7 +409,7 @@ static int find_global(grib_nearest* nearest, grib_handle* h,
if (values) { /* ECC-499 */
grib_get_double_element_internal(h, self->values_key, self->k[kk], &(values[kk]));
}
indexes[kk] = self->k[kk];
indexes[kk] = (int)self->k[kk];
kk++;
}
}

View File

@ -490,7 +490,7 @@ static int find_global(grib_nearest* nearest, grib_handle* h,
grib_context_log(h->context, GRIB_LOG_ERROR, "grib_nearest_reduced: Unable to compute index. Value too large");
return GRIB_OUT_OF_RANGE;
} else {
indexes[kk] = self->k[kk];
indexes[kk] = (int)self->k[kk];
}
kk++;
}

View File

@ -351,7 +351,7 @@ static int find(grib_nearest* nearest, grib_handle* h,
grib_context_log(h->context, GRIB_LOG_ERROR, "grib_nearest_regular: Unable to compute index. Value too large");
return GRIB_OUT_OF_RANGE;
} else {
indexes[kk] = self->k[kk];
indexes[kk] = (int)self->k[kk];
}
kk++;
}

View File

@ -31,10 +31,9 @@ int main(int argc, char** argv)
{
int err = 0;
long step = 0;
size_t nfiles = 0;
size_t i = 0, j = 0;
codes_fieldset* set = NULL;
const size_t max_numfiles = 100;
int nfiles = 0, i = 0, j = 0;
codes_fieldset* set = NULL;
const int max_numfiles = 100;
codes_handle* h = NULL;
char param[20] = {0,};
size_t len = 20;

View File

@ -58,10 +58,11 @@ int grib_tool_new_file_action(grib_runtime_options* options, grib_tools_file* fi
*/
int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
{
size_t i, j, err = 0;
size_t i, j;
size_t last_size = 0;
long missingValuesPresent;
double delta;
int err = 0;
double* values = NULL;
size_t size;