a2dp-codec-sbc: get rid of compiler warnings

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.
This commit is contained in:
Tanu Kaskinen 2019-06-16 12:09:27 +03:00
parent 29c60537d2
commit 4e08c14cc3

View file

@ -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();