From 04e64c9f685ccf00e11238b0e19dc722f8630233 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 13 Oct 2020 08:43:12 +0200 Subject: [PATCH] fix warning (double promotion) --- src/libmemcached/hosts.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libmemcached/hosts.cc b/src/libmemcached/hosts.cc index ab58c922..b8292b2b 100644 --- a/src/libmemcached/hosts.cc +++ b/src/libmemcached/hosts.cc @@ -232,7 +232,7 @@ static memcached_return_t update_continuum(Memcached *ptr) if (memcached_is_weighted_ketama(ptr)) { float pct= (float)list[host_index].weight / (float)total_weight; - pointer_per_server= (uint32_t) ((::floor((float) (pct * MEMCACHED_POINTS_PER_SERVER_KETAMA / 4 * (float)live_servers + 0.0000000001))) * 4); + pointer_per_server= (uint32_t) ((::floor((float) (pct * MEMCACHED_POINTS_PER_SERVER_KETAMA / 4 * (float)live_servers + 0.0000000001F))) * 4); pointer_per_hash= 4; if (0 && DEBUG) { -- 2.30.2