[PATCH 7/7] pcm: add 'default' case for switch statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This commit fixes below compiler warnings.

pcm_direct.c: In function ‘snd1_pcm_direct_prepare’:
pcm_direct.c:821:2: warning: enumeration value ‘SND_PCM_STATE_PREPARED’ not handled in switch [-Wswitch]
  switch (snd_pcm_state(dmix->spcm)) {
  ^

Signed-off-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>
---
 src/pcm/pcm_direct.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
index 21f98e7..a388d4a 100644
--- a/src/pcm/pcm_direct.c
+++ b/src/pcm/pcm_direct.c
@@ -830,6 +830,8 @@ int snd_pcm_direct_prepare(snd_pcm_t *pcm)
 	case SND_PCM_STATE_OPEN:
 	case SND_PCM_STATE_DISCONNECTED:
 		return -EBADFD;
+	default:
+		break;
 	}
 	snd_pcm_direct_check_interleave(dmix, pcm);
 	dmix->state = SND_PCM_STATE_PREPARED;
-- 
2.7.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux