From 54f385b89722c639598ca7f4dd40f0bce873c922 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 19 Feb 2024 14:56:27 +0000 Subject: [PATCH] Fix compiler warnings --- src/grib_nearest.cc | 4 ++-- src/grib_trie_with_rank.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/grib_nearest.cc b/src/grib_nearest.cc index 1367daaf3..d440771f7 100644 --- a/src/grib_nearest.cc +++ b/src/grib_nearest.cc @@ -341,8 +341,8 @@ int grib_nearest_find_generic( double lat1 = 0, lat2 = 0; /* inlat will be between these */ const double LAT_DELTA = 10.0; /* in degrees */ - *out_lons_count = nvalues; /* Maybe overestimate but safe */ - *out_lats_count = nvalues; + *out_lons_count = (int)nvalues; /* Maybe overestimate but safe */ + *out_lats_count = (int)nvalues; if (*out_lats) grib_context_free(nearest->context, *out_lats); diff --git a/src/grib_trie_with_rank.cc b/src/grib_trie_with_rank.cc index d999f9f1f..8b74b6ca6 100644 --- a/src/grib_trie_with_rank.cc +++ b/src/grib_trie_with_rank.cc @@ -485,7 +485,7 @@ int grib_trie_with_rank_insert(grib_trie_with_rank* t, const char* key, void* da grib_oarray_push(t->context, t->objs, data); /* grib_trie_with_rank_insert_in_list(t,data); */ GRIB_MUTEX_UNLOCK(&mutex); - return t->objs->n; + return (int)t->objs->n; } /*