diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2024-02-03 02:37:02 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2024-02-03 02:38:24 +0700 |
commit | e2529ea58fa6c1ebbbfc8455ebfcd43ef72820dc (patch) | |
tree | db6232bef56d758b46c66c6e88fef0167427836c /src/host/layer23/src/mobile | |
parent | ff0e47de6b98f926f54c148996eeaded6f22f9e8 (diff) |
mobile: fix -Wmaybe-uninitialized in tch_csd_rx_{to,from}_l1()
It's unlikely to happen as long as all TCH_DATA_IOF_* variants are
handled in the switch statements, but still gcc does complain.
Change-Id: I0a81d5c4f11feb7cf73771c23848dee9ce6ec620
Diffstat (limited to 'src/host/layer23/src/mobile')
-rw-r--r-- | src/host/layer23/src/mobile/tch_data.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/tch_data.c b/src/host/layer23/src/mobile/tch_data.c index c93c8285..5474bdfe 100644 --- a/src/host/layer23/src/mobile/tch_data.c +++ b/src/host/layer23/src/mobile/tch_data.c @@ -317,6 +317,10 @@ static int tch_csd_rx_from_l1(struct osmocom_ms *ms, struct msgb *msg) swap_words(msgb_l3(msg), msgb_l3len(msg)); osmo_pbit2ubit_ext(data, 0, msgb_l3(msg), 0, data_len, 1); break; + default: + LOGP(DCSD, LOGL_FATAL, + "%s(): unhandled data I/O format\n", __func__); + OSMO_ASSERT(0); } for (unsigned int i = 0; i < desc->num_blocks; i++) { @@ -397,6 +401,10 @@ static int tch_csd_tx_to_l1(struct osmocom_ms *ms) /* ... with swapped words (LE ordering) */ swap_words(msgb_l2(nmsg), msgb_l2len(nmsg)); break; + default: + LOGP(DCSD, LOGL_FATAL, + "%s(): unhandled data I/O format\n", __func__); + OSMO_ASSERT(0); } return gsm48_rr_tx_traffic(ms, nmsg); |