]> git.ipfire.org Git - thirdparty/qemu.git/commit
block/qcow2-cluster: Add missing "fallthrough" annotation
authorThomas Huth <thuth@redhat.com>
Tue, 8 Sep 2020 07:00:28 +0000 (09:00 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 10 Sep 2020 09:11:13 +0000 (11:11 +0200)
commitb9be6faed1a069526efdc80df7318b16afc6e116
tree59b5ecbb86dfaec0cb38c4bb6c9fcf0ed43629d1
parente5ff22ba9fc276c2f8f56af7d82770da027671f1
block/qcow2-cluster: Add missing "fallthrough" annotation

When compiling with -Werror=implicit-fallthrough, the compiler currently
complains:

../../devel/qemu/block/qcow2-cluster.c: In function â€˜cluster_needs_new_alloc’:
../../devel/qemu/block/qcow2-cluster.c:1320:12: error: this statement may fall
 through [-Werror=implicit-fallthrough=]
         if (l2_entry & QCOW_OFLAG_COPIED) {
            ^
../../devel/qemu/block/qcow2-cluster.c:1323:5: note: here
     case QCOW2_CLUSTER_UNALLOCATED:
     ^~~~

It's quite obvious that the fallthrough is intended here, so let's add
a comment to silence the compiler warning.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200908070028.193298-1-thuth@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c