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));
        |                                                ^
This commit is contained in:
Aleksander Morgado
2020-01-11 13:26:43 +01:00
parent c8e4c2e751
commit bcd380a6f1

View File

@@ -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) {