[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] a2dp-codec-sbc: get rid of compiler warnings
Tanu Kaskinen
gitlab at gitlab.freedesktop.org
Sun Jun 16 09:14:38 UTC 2019
Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio
Commits:
4e08c14c by Tanu Kaskinen at 2019-06-16T09:12:31Z
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.
- - - - -
1 changed file:
- src/modules/bluetooth/a2dp-codec-sbc.c
Changes:
=====================================
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();
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/4e08c14cc3434062cb6ae7f05fa998b6530ab040
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/4e08c14cc3434062cb6ae7f05fa998b6530ab040
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20190616/8754b4e6/attachment.html>
More information about the pulseaudio-commits
mailing list