From ac61fd1d78c3d57d8d72446a8b41cfb0c9c1906e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 3 May 2018 11:59:18 +0200 Subject: [PATCH] {input,output}/alsa: work around -Wswitch due to SND_PCM_STATE_PRIVATE1 --- src/input/plugins/AlsaInputPlugin.cxx | 6 ++++++ src/output/plugins/AlsaOutputPlugin.cxx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/input/plugins/AlsaInputPlugin.cxx b/src/input/plugins/AlsaInputPlugin.cxx index 4cbf1644c..d38fcc5f8 100644 --- a/src/input/plugins/AlsaInputPlugin.cxx +++ b/src/input/plugins/AlsaInputPlugin.cxx @@ -270,6 +270,12 @@ AlsaInputStream::Recover(int err) /* this is no error, so just keep running */ err = 0; break; + + default: + /* this default case is just here to work around + -Wswitch due to SND_PCM_STATE_PRIVATE1 (libasound + 1.1.6) */ + break; } diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index cb243c406..87b2ef7e5 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -846,6 +846,12 @@ AlsaOutput::Recover(int err) case SND_PCM_STATE_DRAINING: err = 0; break; + + default: + /* this default case is just here to work around + -Wswitch due to SND_PCM_STATE_PRIVATE1 (libasound + 1.1.6) */ + break; } return err;