[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/6] audio/audio: Add missing fall through comment
From: |
Aleksandar Markovic |
Subject: |
Re: [PATCH v2 1/6] audio/audio: Add missing fall through comment |
Date: |
Wed, 18 Dec 2019 20:36:30 +0100 |
On Wed, Dec 18, 2019 at 8:26 PM Philippe Mathieu-Daudé
<address@hidden> wrote:
>
> When building with GCC9 using CFLAG -Wimplicit-fallthrough=2 we get:
>
> 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
>
> Similarly to e46349414, add the missing fall through comment to
> hint GCC.
>
> Fixes: 2b9cce8c8c
> Reviewed-by: Richard Henderson <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> v2: Reword the description (Aleksandar)
>
Reviewed-by: Aleksandar Markovic <address@hidden>
> Cc: Aleksandar Markovic <address@hidden>
> Cc: Gerd Hoffmann <address@hidden>
> Cc: "Kővágó, Zoltán" <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
>
- [PATCH v2 0/6] Fix more GCC9 -O3 warnings, Philippe Mathieu-Daudé, 2019/12/18
- [PATCH v2 1/6] audio/audio: Add missing fall through comment, Philippe Mathieu-Daudé, 2019/12/18
- Re: [PATCH v2 1/6] audio/audio: Add missing fall through comment,
Aleksandar Markovic <=
- [PATCH v2 2/6] hw/display/tcx: Add missing fall through comments, Philippe Mathieu-Daudé, 2019/12/18
- [PATCH v2 4/6] hw/net/imx_fec: Rewrite fall through comments, Philippe Mathieu-Daudé, 2019/12/18
- [PATCH v2 3/6] hw/timer/aspeed_timer: Add a fall through comment, Philippe Mathieu-Daudé, 2019/12/18
- [RFC PATCH v2 5/6] hw/net/imx_fec: Remove unuseful FALLTHROUGH comments, Philippe Mathieu-Daudé, 2019/12/18