diff --git a/examples/F90/grib_get_pv.f90 b/examples/F90/grib_get_pv.f90 index 230d81575..dadc90b05 100644 --- a/examples/F90/grib_get_pv.f90 +++ b/examples/F90/grib_get_pv.f90 @@ -16,7 +16,7 @@ program grib_get_pv integer :: infile integer :: igrib integer :: PVPresent, nb_pv - real(kind=8), dimension(:), allocatable :: pv + real(kind=4), dimension(:), allocatable :: pv call codes_open_file(infile, '../../data/reduced_gaussian_model_level.grib1', 'r') diff --git a/src/grib_accessor_class_ibmfloat.cc b/src/grib_accessor_class_ibmfloat.cc index b890b7c6a..f46e27d71 100644 --- a/src/grib_accessor_class_ibmfloat.cc +++ b/src/grib_accessor_class_ibmfloat.cc @@ -151,7 +151,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) rlen = count; if (*len < rlen) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%lu) for %s, it contains %lu values", *len, a->name, rlen); + grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%zu) for %s, it contains %lu values", *len, a->name, rlen); *len = 0; return GRIB_ARRAY_TOO_SMALL; } @@ -163,6 +163,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) return GRIB_SUCCESS; } +// ECC-1572: TODO(masn) use templates static int unpack_float(grib_accessor* a, float* val, size_t* len) { unsigned long rlen = 0; @@ -177,7 +178,7 @@ static int unpack_float(grib_accessor* a, float* val, size_t* len) rlen = count; if (*len < rlen) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%lu) for %s, it contains %lu values", *len, a->name, rlen); + grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%zu) for %s, it contains %lu values", *len, a->name, rlen); *len = 0; return GRIB_ARRAY_TOO_SMALL; } diff --git a/src/grib_accessor_class_ieeefloat.cc b/src/grib_accessor_class_ieeefloat.cc index b7d371e4f..3b18a8184 100644 --- a/src/grib_accessor_class_ieeefloat.cc +++ b/src/grib_accessor_class_ieeefloat.cc @@ -195,7 +195,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) return err; if (*len < (size_t)rlen) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%lu) for %s, it contains %ld values", *len, a->name, rlen); + grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%zu) for %s, it contains %ld values", *len, a->name, rlen); *len = 0; return GRIB_ARRAY_TOO_SMALL; } @@ -206,6 +206,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) return GRIB_SUCCESS; } +// ECC-1572: TODO(masn) use templates static int unpack_float(grib_accessor* a, float* val, size_t* len) { long rlen = 0; @@ -218,7 +219,7 @@ static int unpack_float(grib_accessor* a, float* val, size_t* len) return err; if (*len < (size_t)rlen) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%lu) for %s, it contains %ld values", *len, a->name, rlen); + grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%zu) for %s, it contains %ld values", *len, a->name, rlen); *len = 0; return GRIB_ARRAY_TOO_SMALL; }