Get rid of the strict aliasing error by retrieving the ECDT via a table
header pointer and then casting it to the ecdt pointer. This fixes the -O2 build. I'm unsure what changed recently to reveal this error since this code has been unchanged for months.
This commit is contained in:
parent
bf0acc273a
commit
99eb9c8b3b
@ -367,6 +367,7 @@ void
|
||||
acpi_ec_ecdt_probe(device_t parent)
|
||||
{
|
||||
ACPI_TABLE_ECDT *ecdt;
|
||||
ACPI_TABLE_HEADER *hdr;
|
||||
ACPI_STATUS status;
|
||||
device_t child;
|
||||
ACPI_HANDLE h;
|
||||
@ -375,8 +376,8 @@ acpi_ec_ecdt_probe(device_t parent)
|
||||
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
|
||||
|
||||
/* Find and validate the ECDT. */
|
||||
status = AcpiGetFirmwareTable("ECDT", 1, ACPI_LOGICAL_ADDRESSING,
|
||||
(ACPI_TABLE_HEADER **)&ecdt);
|
||||
status = AcpiGetFirmwareTable("ECDT", 1, ACPI_LOGICAL_ADDRESSING, &hdr);
|
||||
ecdt = (ACPI_TABLE_ECDT *)hdr;
|
||||
if (ACPI_FAILURE(status) ||
|
||||
ecdt->control.RegisterBitWidth != 8 ||
|
||||
ecdt->data.RegisterBitWidth != 8) {
|
||||
|
Loading…
Reference in New Issue
Block a user