From 2aba61bbae4e21deae280270c50e777d486682fb Mon Sep 17 00:00:00 2001 From: shahramn Date: Wed, 6 Mar 2024 16:31:23 +0000 Subject: [PATCH] Fix broken test --- fortran/grib_fortran.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fortran/grib_fortran.c b/fortran/grib_fortran.c index c5fcb4fc3..ce9298348 100644 --- a/fortran/grib_fortran.c +++ b/fortran/grib_fortran.c @@ -2103,12 +2103,13 @@ int grib_f_index_get_string_(int* index_id, char* key, char* val, int *eachsize, /*****************************************************************************/ int grib_f_index_get_long_(int* index_id, char* key, long *val, int* size, int len) { + int err = 0; grib_index* h = get_index(*index_id); char buf[1024]; size_t lsize = *size; if (!h) return GRIB_INVALID_GRIB; - int err = grib_index_get_long(h, cast_char(buf,key,len), val, &lsize); + err = grib_index_get_long(h, cast_char(buf,key,len), val, &lsize); *size = lsize; return err; } @@ -2138,12 +2139,13 @@ int grib_f_index_get_int_(int* index_id, char* key, int *val, int* size, int len /*****************************************************************************/ int grib_f_index_get_real8_(int* index_id, char* key, double *val, int* size, int len) { + int err = 0; grib_index* h = get_index(*index_id); char buf[1024]; size_t lsize = *size; if (!h) return GRIB_INVALID_GRIB; - int err = grib_index_get_double(h, cast_char(buf,key,len), val, &lsize); + err = grib_index_get_double(h, cast_char(buf,key,len), val, &lsize); *size = lsize; return err; }