huawei: Fix implicit enum conversion

GCC 10 warns about this implicit conversion:

drivers/huaweimodem/radio-settings.c: In function ‘band_gsm_from_huawei’:
drivers/huaweimodem/radio-settings.c:107:10: error: implicit conversion from ‘enum ofono_radio_band_umts’ to ‘enum ofono_radio_band_gsm’ [-Werror=enum-conversion]
  107 |   return OFONO_RADIO_BAND_UMTS_ANY;

Member from the incorrect enum was returned, both had the value 0, so
the code would still work.
This commit is contained in:
Richard Röjfors 2020-12-20 11:18:27 +00:00 committed by Denis Kenzior
parent 285fad8f39
commit 66cd5df5d7
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ static enum ofono_radio_band_gsm band_gsm_from_huawei(unsigned int band)
size_t i;
if (band == HUAWEI_BAND_ANY)
for (i = ARRAY_SIZE(huawei_band_gsm_table) - 1; i > 0; i--) {
if (huawei_band_gsm_table[i].band_huawei & band)