* [Qemu-devel] [PATCH] audio: Add missing fall through comments
@ 2019-07-18 19:34 Stefan Weil
2019-07-19 6:11 ` Marc-André Lureau
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Stefan Weil @ 2019-07-18 19:34 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-trivial, Stefan Weil, qemu-devel
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
audio/audio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/audio/audio.c b/audio/audio.c
index 5fd9a58a80..a7a13e900a 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)
case AUDIO_FORMAT_S16:
sign = 1;
+ /* fall through */
case AUDIO_FORMAT_U16:
bits = 16;
shift = 1;
@@ -311,6 +312,7 @@ void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings *as)
case AUDIO_FORMAT_S32:
sign = 1;
+ /* fall through */
case AUDIO_FORMAT_U32:
bits = 32;
shift = 2;
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] audio: Add missing fall through comments
2019-07-18 19:34 [Qemu-devel] [PATCH] audio: Add missing fall through comments Stefan Weil
@ 2019-07-19 6:11 ` Marc-André Lureau
2019-07-19 7:29 ` Philippe Mathieu-Daudé
2019-08-13 10:20 ` Gerd Hoffmann
2 siblings, 0 replies; 6+ messages in thread
From: Marc-André Lureau @ 2019-07-19 6:11 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu trival, Gerd Hoffmann, QEMU
On Fri, Jul 19, 2019 at 2:12 AM Stefan Weil <sw@weilnetz.de> wrote:
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> audio/audio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/audio/audio.c b/audio/audio.c
> index 5fd9a58a80..a7a13e900a 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)
>
> case AUDIO_FORMAT_S16:
> sign = 1;
> + /* fall through */
> case AUDIO_FORMAT_U16:
> bits = 16;
> shift = 1;
> @@ -311,6 +312,7 @@ void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings *as)
>
> case AUDIO_FORMAT_S32:
> sign = 1;
> + /* fall through */
> case AUDIO_FORMAT_U32:
> bits = 32;
> shift = 2;
> --
> 2.20.1
>
>
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] audio: Add missing fall through comments
2019-07-18 19:34 [Qemu-devel] [PATCH] audio: Add missing fall through comments Stefan Weil
2019-07-19 6:11 ` Marc-André Lureau
@ 2019-07-19 7:29 ` Philippe Mathieu-Daudé
2019-07-19 7:43 ` Aleksandar Markovic
2019-08-13 10:20 ` Gerd Hoffmann
2 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 7:29 UTC (permalink / raw)
To: Stefan Weil, Gerd Hoffmann; +Cc: qemu-trivial, qemu-devel
On 7/18/19 9:34 PM, Stefan Weil wrote:
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> audio/audio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/audio/audio.c b/audio/audio.c
> index 5fd9a58a80..a7a13e900a 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)
>
> case AUDIO_FORMAT_S16:
> sign = 1;
> + /* fall through */
> case AUDIO_FORMAT_U16:
> bits = 16;
> shift = 1;
> @@ -311,6 +312,7 @@ void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings *as)
>
> case AUDIO_FORMAT_S32:
> sign = 1;
> + /* fall through */
> case AUDIO_FORMAT_U32:
> bits = 32;
> shift = 2;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] audio: Add missing fall through comments
2019-07-19 7:29 ` Philippe Mathieu-Daudé
@ 2019-07-19 7:43 ` Aleksandar Markovic
2019-07-19 10:21 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 6+ messages in thread
From: Aleksandar Markovic @ 2019-07-19 7:43 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-trivial, Stefan Weil, qemu-devel, Gerd Hoffmann
On Jul 19, 2019 9:30 AM, "Philippe Mathieu-Daudé" <philmd@redhat.com> wrote:
>
> On 7/18/19 9:34 PM, Stefan Weil wrote:
> > Signed-off-by: Stefan Weil <sw@weilnetz.de>
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
Philippe, how do you test these comments?
Yours, Aleksandar
> > ---
> > audio/audio.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/audio/audio.c b/audio/audio.c
> > index 5fd9a58a80..a7a13e900a 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)
> >
> > case AUDIO_FORMAT_S16:
> > sign = 1;
> > + /* fall through */
> > case AUDIO_FORMAT_U16:
> > bits = 16;
> > shift = 1;
> > @@ -311,6 +312,7 @@ void audio_pcm_init_info (struct audio_pcm_info
*info, struct audsettings *as)
> >
> > case AUDIO_FORMAT_S32:
> > sign = 1;
> > + /* fall through */
> > case AUDIO_FORMAT_U32:
> > bits = 32;
> > shift = 2;
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] audio: Add missing fall through comments
2019-07-19 7:43 ` Aleksandar Markovic
@ 2019-07-19 10:21 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 10:21 UTC (permalink / raw)
To: Aleksandar Markovic; +Cc: qemu-trivial, Stefan Weil, qemu-devel, Gerd Hoffmann
On 7/19/19 9:43 AM, Aleksandar Markovic wrote:
>
> On Jul 19, 2019 9:30 AM, "Philippe Mathieu-Daudé" <philmd@redhat.com
> <mailto:philmd@redhat.com>> wrote:
>>
>> On 7/18/19 9:34 PM, Stefan Weil wrote:
>> > Signed-off-by: Stefan Weil <sw@weilnetz.de <mailto:sw@weilnetz.de>>
>>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com
> <mailto:philmd@redhat.com>>
>> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com
> <mailto:philmd@redhat.com>>
>>
>
> Philippe, how do you test these comments?
The testing is quite easy since it doesn't build with
'-Wimplicit-fallthrough=2':
CC audio/audio.o
/home/phil/source/qemu/audio/audio.c: In function ‘audio_pcm_init_info’:
/home/phil/source/qemu/audio/audio.c:308:14: error: this statement may
fall through [-Werror=implicit-fallthrough=]
308 | sign = 1;
| ~~~~~^~~
/home/phil/source/qemu/audio/audio.c:309:5: note: here
309 | case AUDIO_FORMAT_U16:
| ^~~~
/home/phil/source/qemu/audio/audio.c:315:14: error: this statement may
fall through [-Werror=implicit-fallthrough=]
315 | sign = 1;
| ~~~~~^~~
/home/phil/source/qemu/audio/audio.c:316:5: note: here
316 | case AUDIO_FORMAT_U32:
| ^~~~
cc1: all warnings being treated as errors
With Stefan patch applied:
CC audio/audio.o
CC audio/audio_legacy.o
CC audio/noaudio.o
CC audio/wavaudio.o
CC audio/mixeng.o
CC audio/spiceaudio.o
CC audio/wavcapture.o
[...]
>
> Yours, Aleksandar
>
>> > ---
>> > audio/audio.c | 2 ++
>> > 1 file changed, 2 insertions(+)
>> >
>> > diff --git a/audio/audio.c b/audio/audio.c
>> > index 5fd9a58a80..a7a13e900a 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)
>> >
>> > case AUDIO_FORMAT_S16:
>> > sign = 1;
>> > + /* fall through */
>> > case AUDIO_FORMAT_U16:
>> > bits = 16;
>> > shift = 1;
>> > @@ -311,6 +312,7 @@ void audio_pcm_init_info (struct audio_pcm_info
> *info, struct audsettings *as)
>> >
>> > case AUDIO_FORMAT_S32:
>> > sign = 1;
>> > + /* fall through */
>> > case AUDIO_FORMAT_U32:
>> > bits = 32;
>> > shift = 2;
>> >
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] audio: Add missing fall through comments
2019-07-18 19:34 [Qemu-devel] [PATCH] audio: Add missing fall through comments Stefan Weil
2019-07-19 6:11 ` Marc-André Lureau
2019-07-19 7:29 ` Philippe Mathieu-Daudé
@ 2019-08-13 10:20 ` Gerd Hoffmann
2 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2019-08-13 10:20 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel
On Thu, Jul 18, 2019 at 09:34:41PM +0200, Stefan Weil wrote:
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
Added to audio queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-13 10:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 19:34 [Qemu-devel] [PATCH] audio: Add missing fall through comments Stefan Weil
2019-07-19 6:11 ` Marc-André Lureau
2019-07-19 7:29 ` Philippe Mathieu-Daudé
2019-07-19 7:43 ` Aleksandar Markovic
2019-07-19 10:21 ` Philippe Mathieu-Daudé
2019-08-13 10:20 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).