diff options
author | Max Kellermann <max@duempel.org> | 2011-10-08 14:37:54 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-10-08 14:41:11 +0200 |
commit | 72a1ca3b99302e229d4a7f699c45b9fa7288c1a8 (patch) | |
tree | 2c87cbfe088af5d8ff44cfb4c87d28123a3cea5e /src/output/alsa_plugin.c | |
parent | 72ff9bd3e67e1fb9acc7cc7857944d5b25d3e9c5 (diff) | |
download | mpd-72a1ca3b99302e229d4a7f699c45b9fa7288c1a8.tar.gz mpd-72a1ca3b99302e229d4a7f699c45b9fa7288c1a8.tar.xz mpd-72a1ca3b99302e229d4a7f699c45b9fa7288c1a8.zip |
output/alsa: remove "default" case from switch
Allow gcc to warn when a new format isn't supported.
Diffstat (limited to '')
-rw-r--r-- | src/output/alsa_plugin.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c index 422264f53..ae06847c2 100644 --- a/src/output/alsa_plugin.c +++ b/src/output/alsa_plugin.c @@ -186,6 +186,9 @@ static snd_pcm_format_t get_bitformat(enum sample_format sample_format) { switch (sample_format) { + case SAMPLE_FORMAT_UNDEFINED: + return SND_PCM_FORMAT_UNKNOWN; + case SAMPLE_FORMAT_S8: return SND_PCM_FORMAT_S8; @@ -202,10 +205,10 @@ get_bitformat(enum sample_format sample_format) case SAMPLE_FORMAT_S32: return SND_PCM_FORMAT_S32; - - default: - return SND_PCM_FORMAT_UNKNOWN; } + + assert(false); + return SND_PCM_FORMAT_UNKNOWN; } static snd_pcm_format_t |