[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] block/qcow2-cluster: Add missing "fallthrough" annotation
From: |
Kevin Wolf |
Subject: |
Re: [PATCH] block/qcow2-cluster: Add missing "fallthrough" annotation |
Date: |
Tue, 8 Sep 2020 16:42:21 +0200 |
Am 08.09.2020 um 09:00 hat Thomas Huth geschrieben:
> 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>
Thanks, applied to the block branch.
Kevin