From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNjwm-0004fR-2c for qemu-devel@nongnu.org; Wed, 12 Mar 2014 10:15:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNjwh-0005bD-BL for qemu-devel@nongnu.org; Wed, 12 Mar 2014 10:15:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNjwh-0005ay-1N for qemu-devel@nongnu.org; Wed, 12 Mar 2014 10:15:47 -0400 Date: Wed, 12 Mar 2014 16:15:43 +0200 From: "Michael S. Tsirkin" Message-ID: <1394633738-31425-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] acpi-build: fix misaligned access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori clang build reported a misaligned access: runtime error: store to misaligned address 0x2b5aa47dfb19 for type 'uint16_t' (aka 'unsigned short'), which requires 2 byte alignment 0x2b5aa47dfb19: note: pointer points here 45 53 54 0b ff ff 5b 80 50 45 4f 52 01 50 45 53 54 01 5b 81 0b 50 45 4f 52 01 50 45 50 54 08 14 fix this up Reported-by: Peter Maydell Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7ecfd70..4d781a1 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1019,8 +1019,8 @@ build_ssdt(GArray *table_data, GArray *linker, patch_pci_windows(pci, ssdt_ptr, sizeof(ssdp_misc_aml)); - *(uint16_t *)(ssdt_ptr + *ssdt_isa_pest) = - cpu_to_le16(misc->pvpanic_port); + ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml), + ssdt_isa_pest[0], 16, misc->pvpanic_port); { GArray *sb_scope = build_alloc_array(); -- MST