AppVeyor: Fix Windows compilation: errors C2057, C2466 and C2133

This commit is contained in:
Shahram Najm 2022-03-18 20:49:51 +00:00
parent 040093c655
commit 12c69ba735
1 changed files with 2 additions and 1 deletions

View File

@ -1065,6 +1065,8 @@ static grib_handle* new_message_from_file(int message_type, grib_context* c, FIL
return NULL; return NULL;
} }
#define MAX_NUM_KEYS 40
int _codes_index_add_file(grib_index* index, const char* filename, int message_type) int _codes_index_add_file(grib_index* index, const char* filename, int message_type)
{ {
double dval; double dval;
@ -1130,7 +1132,6 @@ int _codes_index_add_file(grib_index* index, const char* filename, int message_t
{ {
char* envsetkeys = getenv("ECCODES_INDEX_SET_KEYS"); char* envsetkeys = getenv("ECCODES_INDEX_SET_KEYS");
if (envsetkeys) { if (envsetkeys) {
const int MAX_NUM_KEYS = 40;
grib_values set_values[MAX_NUM_KEYS]; grib_values set_values[MAX_NUM_KEYS];
int set_values_count = MAX_NUM_KEYS; int set_values_count = MAX_NUM_KEYS;
int error = parse_keyval_string(NULL, envsetkeys, 1, GRIB_TYPE_UNDEFINED, int error = parse_keyval_string(NULL, envsetkeys, 1, GRIB_TYPE_UNDEFINED,