From bcd380a6f1f1b42b0ce2cf79ed46634eccbd15eb Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sat, 11 Jan 2020 13:26:43 +0100 Subject: broadband-modem-mbim: fix warnings with -Wdouble-promotion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mm-broadband-modem-mbim.c: In function ‘atds_signal_query_ready’: mm-broadband-modem-mbim.c:4389:49: error: implicit conversion from ‘float’ to ‘double’ to match other operand of binary expression [-Werror=double-promotion] 4389 | mm_signal_set_ecio (result->umts, -24.0 + ((float) ecno / 2)); | ^ mm-broadband-modem-mbim.c:4394:48: error: implicit conversion from ‘float’ to ‘double’ to match other operand of binary expression [-Werror=double-promotion] 4394 | mm_signal_set_rsrq (result->lte, -19.5 + ((float) rsrq / 2)); | ^ --- src/mm-broadband-modem-mbim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index 4c146704..9e5e8e10 100644 --- a/src/mm-broadband-modem-mbim.c +++ b/src/mm-broadband-modem-mbim.c @@ -4402,12 +4402,12 @@ atds_signal_query_ready (MbimDevice *device, if (ecno <= 49) { if (!result->umts) result->umts = mm_signal_new (); - mm_signal_set_ecio (result->umts, -24.0 + ((float) ecno / 2)); + mm_signal_set_ecio (result->umts, -24.0 + ((gdouble) ecno / 2)); } if (rsrq <= 34) { result->lte = mm_signal_new (); - mm_signal_set_rsrq (result->lte, -19.5 + ((float) rsrq / 2)); + mm_signal_set_rsrq (result->lte, -19.5 + ((gdouble) rsrq / 2)); } if (rsrp <= 97) { -- cgit v1.2.3-70-g09d2