RADIO: Add an explicit check to silence a build warning
clang did not like that in this function it looks like it may return an unitialized value, even though it should not happen, let's add a runtime else with an error. Both to silence the build warning and error out in runtime if it ever happens. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
7630b6947e
commit
e55aaff135
|
@ -273,6 +273,8 @@ static p2G4_modulation_t nhra_modulation_from_mode(uint32_t MODE) {
|
|||
} else if ((MODE == RADIO_MODE_MODE_Ble_LR125Kbit)
|
||||
|| (MODE == RADIO_MODE_MODE_Ble_LR500Kbit)) {
|
||||
modulation = P2G4_MOD_BLE_CODED;
|
||||
} else {
|
||||
bs_trace_error_time_line("programming error: Unsupported MODE %u\n", MODE);
|
||||
}
|
||||
return modulation;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue