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

Colin King colin.king at canonical.com
Mon Jul 30 18:30:56 UTC 2018


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;
 }
 
-- 
2.17.1




More information about the fwts-devel mailing list