From 4e08c14cc3434062cb6ae7f05fa998b6530ab040 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sun, 16 Jun 2019 12:09:27 +0300 Subject: [PATCH] a2dp-codec-sbc: get rid of compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warnings: modules/bluetooth/a2dp-codec-sbc.c: In function ‘default_bitpool’: modules/bluetooth/a2dp-codec-sbc.c:161:13: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (mode) { ^~~~~~ modules/bluetooth/a2dp-codec-sbc.c:169:9: note: here case SBC_SAMPLING_FREQ_44100: ^~~~ modules/bluetooth/a2dp-codec-sbc.c:170:13: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (mode) { ^~~~~~ modules/bluetooth/a2dp-codec-sbc.c:180:9: note: here case SBC_SAMPLING_FREQ_48000: ^~~~ These were valid warnings in that an invalid channel mode would result in unintended fallthroughs, but the end result would anyway been a crash in the pa_assert_not_reached() at the end of the function, so functionally there's no change. --- src/modules/bluetooth/a2dp-codec-sbc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/bluetooth/a2dp-codec-sbc.c b/src/modules/bluetooth/a2dp-codec-sbc.c index cdc20d7f0..e4c1dff01 100644 --- a/src/modules/bluetooth/a2dp-codec-sbc.c +++ b/src/modules/bluetooth/a2dp-codec-sbc.c @@ -165,6 +165,7 @@ static uint8_t default_bitpool(uint8_t freq, uint8_t mode) { case SBC_CHANNEL_MODE_JOINT_STEREO: return SBC_BITPOOL_HQ_JOINT_STEREO_44100; } + break; case SBC_SAMPLING_FREQ_44100: switch (mode) { @@ -176,6 +177,7 @@ static uint8_t default_bitpool(uint8_t freq, uint8_t mode) { case SBC_CHANNEL_MODE_JOINT_STEREO: return SBC_BITPOOL_HQ_JOINT_STEREO_44100; } + break; case SBC_SAMPLING_FREQ_48000: switch (mode) { @@ -187,6 +189,7 @@ static uint8_t default_bitpool(uint8_t freq, uint8_t mode) { case SBC_CHANNEL_MODE_JOINT_STEREO: return SBC_BITPOOL_HQ_JOINT_STEREO_48000; } + break; } pa_assert_not_reached();