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:
Alberto Escolar Piedras 2024-04-17 09:46:09 +02:00
parent 7630b6947e
commit e55aaff135
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}