git: e474fdfde604 - main - acpidump: quiet gcc -Wstrict-aliasing
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Oct 2025 20:08:00 UTC
The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=e474fdfde604372000fc6bc4f7197b1e7c904597 commit e474fdfde604372000fc6bc4f7197b1e7c904597 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2025-10-09 19:29:37 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2025-10-09 19:29:37 +0000 acpidump: quiet gcc -Wstrict-aliasing Appease GCC. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52941 --- usr.sbin/acpi/acpidump/acpi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index 63613d5a4707..026795118832 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -1913,16 +1913,19 @@ acpi_handle_ivrs_ivmd_type(ACPI_IVRS_MEMORY *addr) static void acpi_handle_ivrs_ivmd(ACPI_IVRS_MEMORY *addr) { + UINT16 x16; + printf("\tMem Type=%#x(%s) ", addr->Header.Type, acpi_handle_ivrs_ivmd_type(addr)); switch (addr->Header.Type) { case ACPI_IVRS_TYPE_MEMORY2: - printf("Id=%#06x PCISeg=%#x ", addr->Header.DeviceId, - *(UINT16 *)&addr->Reserved); + memcpy(&x16, &addr->Reserved, sizeof(x16)); + printf("Id=%#06x PCISeg=%#x ", addr->Header.DeviceId, x16); break; case ACPI_IVRS_TYPE_MEMORY3: + memcpy(&x16, &addr->Reserved, sizeof(x16)); printf("Id=%#06x-%#06x PCISeg=%#x", addr->Header.DeviceId, - addr->AuxData, *(UINT16 *)&addr->Reserved); + addr->AuxData, x16); break; } printf("Start=%#18jx Length=%#jx Flags=",