Re: [PATCH] ACPICA: fix -Wfallthrough

From: Nick Desaulniers
Date: Fri Nov 13 2020 - 16:04:22 EST


On Fri, Nov 13, 2020 at 1:01 PM Moore, Robert <robert.moore@xxxxxxxxx> wrote:
>
> I can do it this way:
>
> In the global header actypes.h:
>
> #ifndef ACPI_FALLTHROUGH
> #define ACPI_FALLTHROUGH
> #endif
>
> In the gcc-specific header (acgcc.h):
>
> #define ACPI_FALLTHROUGH __attribute__((__fallthrough__))
>
> This would not be #defined in the MSVC-specific header (acmsvc.h) -- thus using the default (null) in actypes.h (The per-environment headers are always included first).
>
> (We do all macros in upper case, prefixed with "ACPI_")
>
> If you can update your patch to use ACPI_FALLTHROUGH, I can do the rest (above).

Sure, I can do that. I'd need to wrap it in a little more logic for
__has_attribute to support old GCC versions, but that should be
doable.
--
Thanks,
~Nick Desaulniers