From 0466577c1eb0e98e081ac2047b5f9b956e22db60 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 19 Dec 2022 12:24:01 +0000 Subject: [PATCH] Compiler warnings: Conversion from size_t to int --- src/grib_accessor_class_bufr_data_element.c | 3 ++- src/grib_bufr_descriptors_array.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/grib_accessor_class_bufr_data_element.c b/src/grib_accessor_class_bufr_data_element.c index 45d905598..c8b2d59f5 100644 --- a/src/grib_accessor_class_bufr_data_element.c +++ b/src/grib_accessor_class_bufr_data_element.c @@ -557,7 +557,8 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) static int value_count(grib_accessor* a, long* count) { - int ret = 0, size, type, idx; + int ret = 0, type = 0, idx = 0; + size_t size = 0; grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; if (!self->compressedData) { diff --git a/src/grib_bufr_descriptors_array.c b/src/grib_bufr_descriptors_array.c index 2e4898640..b524caf26 100644 --- a/src/grib_bufr_descriptors_array.c +++ b/src/grib_bufr_descriptors_array.c @@ -137,7 +137,7 @@ bufr_descriptors_array* grib_bufr_descriptors_array_append(bufr_descriptors_arra bufr_descriptors_array* grib_bufr_descriptors_array_push_front(bufr_descriptors_array* v, bufr_descriptor* val) { - int i; + size_t i = 0; if (!v) { size_t start_size = DYN_ARRAY_SIZE_INIT; size_t start_incsize = DYN_ARRAY_SIZE_INCR;