ACK: [PATCH 4/7] lib/src/fwts_acpi_tables: disable clang warning

ivanhu ivan.hu at canonical.com
Tue Jul 31 07:49:35 UTC 2018



On 07/31/2018 02:30 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> clang warns when we take the address of an object inside a
> packed structure.  Disable this warning as I believe this
> is OK for architectures that perform this operation.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/lib/src/fwts_acpi_tables.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index c7ba59be..f28ed60a 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -393,10 +393,13 @@ static int fwts_acpi_handle_fadt(
>  	/* Determine FACS addr and load it.
>  	 * Will ignore the missing FACS in the hardware-reduced mode.
>  	 */
> +PRAGMA_PUSH
> +PRAGMA_PACK_WARN_OFF
>  	result = fwts_acpi_handle_fadt_tables(fw, fadt,
>  			"FACS", "FIRMWARE_CTRL", "X_FIRMWARE_CTRL",
>  			&fadt->firmware_control, &fadt->x_firmware_ctrl,
>  			provenance);
> +PRAGMA_POP
>  	if (result != FWTS_OK) {
>  		if ((result == FWTS_NULL_POINTER) &&
>  				fwts_acpi_is_reduced_hardware(fadt)) {
> @@ -408,12 +411,15 @@ static int fwts_acpi_handle_fadt(
>  		}
>  	}
>  	/* Determine DSDT addr and load it */
> +PRAGMA_PUSH
> +PRAGMA_PACK_WARN_OFF
>  	if (fwts_acpi_handle_fadt_tables(fw, fadt,
>  	    "DSDT", "DSTD", "X_DSDT",
>  	    &fadt->dsdt, &fadt->x_dsdt, provenance) != FWTS_OK) {
>  		fwts_log_error(fw, "Failed to load DSDT.");
>  		return FWTS_ERROR;
>  	}
> +PRAGMA_POP
>  	return FWTS_OK;
>  }
>  
Acked-by: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180731/0aa8ae7d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180731/0aa8ae7d/attachment.sig>


More information about the fwts-devel mailing list