From 12c69ba7356441cbd883da557dc267fcb44316ee Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 18 Mar 2022 20:49:51 +0000 Subject: [PATCH] AppVeyor: Fix Windows compilation: errors C2057, C2466 and C2133 --- src/grib_index.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grib_index.c b/src/grib_index.c index 9fb41f794..a9db3bdeb 100644 --- a/src/grib_index.c +++ b/src/grib_index.c @@ -1065,6 +1065,8 @@ static grib_handle* new_message_from_file(int message_type, grib_context* c, FIL return NULL; } +#define MAX_NUM_KEYS 40 + int _codes_index_add_file(grib_index* index, const char* filename, int message_type) { 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"); if (envsetkeys) { - const int MAX_NUM_KEYS = 40; grib_values set_values[MAX_NUM_KEYS]; int set_values_count = MAX_NUM_KEYS; int error = parse_keyval_string(NULL, envsetkeys, 1, GRIB_TYPE_UNDEFINED,