[PATCH] Fixes: Fallthrough warning on line 270 of qemu/qapi/opts-visitor.c

Rohit Shinde posted 1 patch 3 years, 8 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora passed
Test checkpatch passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200815151148.10571-1-rohit.shinde12194@gmail.com
Maintainers: Markus Armbruster <armbru@redhat.com>, Michael Roth <mdroth@linux.vnet.ibm.com>
There is a newer version of this series
qapi/opts-visitor.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] Fixes: Fallthrough warning on line 270 of qemu/qapi/opts-visitor.c
Posted by Rohit Shinde 3 years, 8 months ago
Added the fallthrough comment so that the compiler doesn't emit an error on compiling with the -Wimplicit-fallthrough flag.

Signed-off-by: Rohit Shinde <rohit.shinde12194@gmail.com>
---
 qapi/opts-visitor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index 7781c23a42..43cf60d3a0 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -266,6 +266,7 @@ opts_next_list(Visitor *v, GenericList *tail, size_t size)
         }
         ov->list_mode = LM_IN_PROGRESS;
         /* range has been completed, fall through in order to pop option */
+        __attribute__((fallthrough));
 
     case LM_IN_PROGRESS: {
         const QemuOpt *opt;
-- 
2.25.1


Re: [PATCH] Fixes: Fallthrough warning on line 270 of qemu/qapi/opts-visitor.c
Posted by Philippe Mathieu-Daudé 3 years, 8 months ago
When you repost a patch, please add a version. This is patch v2.
Next (once you read my v1 comments) should be v3.

Watch out, v1 correctly Cc'ed the maintainers, this v2 doesn't.

On 8/15/20 5:11 PM, Rohit Shinde wrote:
> Added the fallthrough comment so that the compiler doesn't emit an error on compiling with the -Wimplicit-fallthrough flag.
> 
> Signed-off-by: Rohit Shinde <rohit.shinde12194@gmail.com>
> ---
>  qapi/opts-visitor.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
> index 7781c23a42..43cf60d3a0 100644
> --- a/qapi/opts-visitor.c
> +++ b/qapi/opts-visitor.c
> @@ -266,6 +266,7 @@ opts_next_list(Visitor *v, GenericList *tail, size_t size)
>          }
>          ov->list_mode = LM_IN_PROGRESS;
>          /* range has been completed, fall through in order to pop option */
> +        __attribute__((fallthrough));
>  
>      case LM_IN_PROGRESS: {
>          const QemuOpt *opt;
> 


Re: [PATCH] Fixes: Fallthrough warning on line 270 of qemu/qapi/opts-visitor.c
Posted by no-reply@patchew.org 3 years, 8 months ago
Patchew URL: https://patchew.org/QEMU/20200815151148.10571-1-rohit.shinde12194@gmail.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      qapi/qapi-types-transaction.o
  CC      qapi/qapi-builtin-visit.o
/tmp/qemu-test/src/qapi/opts-visitor.c: In function 'opts_next_list':
/tmp/qemu-test/src/qapi/opts-visitor.c:269:9: error: empty declaration [-Werror]
         __attribute__((fallthrough));
         ^
cc1: all warnings being treated as errors
make: *** [qapi/opts-visitor.o] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 709, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=cbaed9e0baf94ba9adfd067fc89d7df2', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-b0zxj7yg/src/docker-src.2020-08-15-12.10.41.4314:/var/tmp/qemu:z,ro', 'qemu/centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=cbaed9e0baf94ba9adfd067fc89d7df2
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-b0zxj7yg/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    1m57.885s
user    0m6.528s


The full log is available at
http://patchew.org/logs/20200815151148.10571-1-rohit.shinde12194@gmail.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com