[pulseaudio-discuss] [PATCH 4/7] alsa-mixer: Add a default case for a switch, so that the compiler won't complain about unhandled cases.
Tanu Kaskinen
tanu.kaskinen at digia.com
Fri Mar 4 07:42:10 PST 2011
---
src/modules/alsa/alsa-mixer.c | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index f71dfc3..6fbd560 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -1246,21 +1246,23 @@ static int check_required(pa_alsa_element *e, snd_mixer_elem_t *me) {
if (e->required_any != PA_ALSA_REQUIRED_IGNORE) {
switch (e->required_any) {
- case PA_ALSA_REQUIRED_VOLUME:
- e->path->req_any_present |= (e->volume_use != PA_ALSA_VOLUME_IGNORE);
- break;
- case PA_ALSA_REQUIRED_SWITCH:
- e->path->req_any_present |= (e->switch_use != PA_ALSA_SWITCH_IGNORE);
- break;
- case PA_ALSA_REQUIRED_ENUMERATION:
- e->path->req_any_present |= (e->enumeration_use != PA_ALSA_ENUMERATION_IGNORE);
- break;
- case PA_ALSA_REQUIRED_ANY:
- e->path->req_any_present |=
- (e->volume_use != PA_ALSA_VOLUME_IGNORE) ||
- (e->switch_use != PA_ALSA_SWITCH_IGNORE) ||
- (e->enumeration_use != PA_ALSA_ENUMERATION_IGNORE);
- break;
+ case PA_ALSA_REQUIRED_VOLUME:
+ e->path->req_any_present |= (e->volume_use != PA_ALSA_VOLUME_IGNORE);
+ break;
+ case PA_ALSA_REQUIRED_SWITCH:
+ e->path->req_any_present |= (e->switch_use != PA_ALSA_SWITCH_IGNORE);
+ break;
+ case PA_ALSA_REQUIRED_ENUMERATION:
+ e->path->req_any_present |= (e->enumeration_use != PA_ALSA_ENUMERATION_IGNORE);
+ break;
+ case PA_ALSA_REQUIRED_ANY:
+ e->path->req_any_present |=
+ (e->volume_use != PA_ALSA_VOLUME_IGNORE) ||
+ (e->switch_use != PA_ALSA_SWITCH_IGNORE) ||
+ (e->enumeration_use != PA_ALSA_ENUMERATION_IGNORE);
+ break;
+ default:
+ pa_assert_not_reached();
}
}
--
1.7.4.1
More information about the pulseaudio-discuss
mailing list