qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/6] audio/audio: Add missing fall through comment


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 1/6] audio/audio: Add missing fall through comment
Date: Wed, 18 Dec 2019 11:22:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/18/19 9:02 AM, Aleksandar Markovic wrote:


On Tuesday, December 17, 2019, Philippe Mathieu-Daudé <address@hidden <mailto:address@hidden>> wrote:

    GCC9 is confused by this comment when building with
    CFLAG -Wimplicit-fallthrough=2:


Gcc is not confused whatsoever.

It is right! I'll update the description :)


       audio/audio.c: In function ‘audio_pcm_init_info’:
       audio/audio.c:306:14: error: this statement may fall through
    [-Werror=implicit-fallthrough=]
         306 |         sign = 1;
             |         ~~~~~^~~
       audio/audio.c:307:5: note: here
         307 |     case AUDIO_FORMAT_U8:
             |     ^~~~
       cc1: all warnings being treated as errors

    Add the missing fall through comment, similarly to e46349414.

    Fixes: 2b9cce8c8c
    Signed-off-by: Philippe Mathieu-Daudé <address@hidden
    <mailto:address@hidden>>
    ---
    Cc: Gerd Hoffmann <address@hidden <mailto:address@hidden>>
    Cc: "Kővágó, Zoltán" <address@hidden
    <mailto:address@hidden>>
    ---
      audio/audio.c | 1 +
      1 file changed, 1 insertion(+)

    diff --git a/audio/audio.c b/audio/audio.c
    index 56fae55047..57daf3f620 100644
    --- a/audio/audio.c
    +++ b/audio/audio.c
    @@ -304,6 +304,7 @@ void audio_pcm_init_info (struct audio_pcm_info
    *info, struct audsettings *as)
          switch (as->fmt) {
          case AUDIO_FORMAT_S8:
              sign = 1;
    +        /* fall through */
          case AUDIO_FORMAT_U8:
              mul = 1;
              break;
-- 2.21.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]