Skip to contentSkip to conversation

audio: Add some fall through comments

PATCH Applied Stefan Weil 2 participants 2 messages Feb 25, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audio: Add some fall through comments

Static code analysers expect these comments for case statements without a break statement.

---
 audio/audio.c    |    3 +++
 audio/esdaudio.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
audio/audio.c +3 -0
index 5fff6de..398763f 100644
@@ -585,17 +585,20 @@ static int audio_pcm_info_eq (struct audio_pcm_info *info, struct audsettings *a
     switch (as->fmt) {
     case AUD_FMT_S8:
         sign = 1;
+        /* fall through */
     case AUD_FMT_U8:
         break;
 
     case AUD_FMT_S16:
         sign = 1;
+        /* fall through */
     case AUD_FMT_U16:
         bits = 16;
         break;
 
     case AUD_FMT_S32:
         sign = 1;
+        /* fall through */
     case AUD_FMT_U32:
         bits = 32;
         break;
audio/esdaudio.c +1 -1
index bd6e1cc..eea9cce 100644
@@ -201,7 +201,7 @@ static int qesd_init_out (HWVoiceOut *hw, struct audsettings *as)
     case AUD_FMT_S32:
     case AUD_FMT_U32:
         dolog ("Will use 16 instead of 32 bit samples\n");
-
+        /* fall through */
     case AUD_FMT_S16:
     case AUD_FMT_U16:
     deffmt:
Signature · 1 line
1.7.9
Applied
#1 lore raw
Quoted 2 lines · Stefan Weil

Static code analysers expect these comments for case statements without a break statement.

Applied, thanks.

[..snip..]

Signature · 1 line
mailto:[email protected]