Message ID | 4e765b488f59391b94da71a7cbaaebedc3a0a18f.1697186560.git.manos.pitsidianakis@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Strict disable implicit fallthrough | expand |
> On 13-Oct-2023, at 2:15 PM, Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> wrote: > > In preparation of raising -Wimplicit-fallthrough to 5, replace all > fall-through comments with the fallthrough attribute pseudo-keyword. > > Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> What was wrong with QEMU_FALLTHROUGH? https://www.mail-archive.com/qemu-devel@nongnu.org/msg996916.html does not explain and there is no commit message that justifies the change. Other than that, Reviewed-by: Ani Sinha <anisinha@redhat.com> > --- > hw/acpi/aml-build.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c > index af66bde0f5..b0cf0c6073 100644 > --- a/hw/acpi/aml-build.c > +++ b/hw/acpi/aml-build.c > @@ -326,17 +326,16 @@ build_prepend_package_length(GArray *package, unsigned length, bool incl_self) > byte = length >> PACKAGE_LENGTH_4BYTE_SHIFT; > build_prepend_byte(package, byte); > length &= (1 << PACKAGE_LENGTH_4BYTE_SHIFT) - 1; > - /* fall through */ > + fallthrough; > case 3: > byte = length >> PACKAGE_LENGTH_3BYTE_SHIFT; > build_prepend_byte(package, byte); > length &= (1 << PACKAGE_LENGTH_3BYTE_SHIFT) - 1; > - /* fall through */ > + fallthrough; > case 2: > byte = length >> PACKAGE_LENGTH_2BYTE_SHIFT; > build_prepend_byte(package, byte); > length &= (1 << PACKAGE_LENGTH_2BYTE_SHIFT) - 1; > - /* fall through */ > } > /* > * Most significant two bits of byte zero indicate how many following bytes > @@ -528,6 +527,7 @@ void aml_append(Aml *parent_ctx, Aml *child) > */ > build_append_byte(buf, 0); > /* fall through, to pack resources in buffer */ > + fallthrough; > case AML_BUFFER: > build_buffer(buf, child->op); > break; > -- > 2.39.2 >
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index af66bde0f5..b0cf0c6073 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -326,17 +326,16 @@ build_prepend_package_length(GArray *package, unsigned length, bool incl_self) byte = length >> PACKAGE_LENGTH_4BYTE_SHIFT; build_prepend_byte(package, byte); length &= (1 << PACKAGE_LENGTH_4BYTE_SHIFT) - 1; - /* fall through */ + fallthrough; case 3: byte = length >> PACKAGE_LENGTH_3BYTE_SHIFT; build_prepend_byte(package, byte); length &= (1 << PACKAGE_LENGTH_3BYTE_SHIFT) - 1; - /* fall through */ + fallthrough; case 2: byte = length >> PACKAGE_LENGTH_2BYTE_SHIFT; build_prepend_byte(package, byte); length &= (1 << PACKAGE_LENGTH_2BYTE_SHIFT) - 1; - /* fall through */ } /* * Most significant two bits of byte zero indicate how many following bytes @@ -528,6 +527,7 @@ void aml_append(Aml *parent_ctx, Aml *child) */ build_append_byte(buf, 0); /* fall through, to pack resources in buffer */ + fallthrough; case AML_BUFFER: build_buffer(buf, child->op); break;
In preparation of raising -Wimplicit-fallthrough to 5, replace all fall-through comments with the fallthrough attribute pseudo-keyword. Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> --- hw/acpi/aml-build.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)