diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-11 13:26:43 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-30 19:09:52 +0100 |
commit | bcd380a6f1f1b42b0ce2cf79ed46634eccbd15eb (patch) | |
tree | d32b7033445219a8a5bbee3cbc9458d81e504732 | |
parent | c8e4c2e751e66d0e0c86ea4a2055331e9eedca88 (diff) |
broadband-modem-mbim: fix warnings with -Wdouble-promotion
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));
| ^
-rw-r--r-- | src/mm-broadband-modem-mbim.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |