Date: Fri, 29 Dec 2017 12:47:23 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327338 - projects/clang600-import/sys/contrib/dev/acpica/include Message-ID: <201712291247.vBTClNxM009974@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Fri Dec 29 12:47:23 2017 New Revision: 327338 URL: https://svnweb.freebsd.org/changeset/base/327338 Log: Work around clang 6.0.0 warnings about arithmetic on NULL pointers in acpica, by redefining the ACPI_ADD_PTR and ACPI_SUB_PTR macros so they use integer arithmetic instead. This is a temporary fix, to be reverted before merging back to head, unless jkim reads my mail and agrees with this. :) Modified: projects/clang600-import/sys/contrib/dev/acpica/include/actypes.h Modified: projects/clang600-import/sys/contrib/dev/acpica/include/actypes.h ============================================================================== --- projects/clang600-import/sys/contrib/dev/acpica/include/actypes.h Fri Dec 29 10:47:24 2017 (r327337) +++ projects/clang600-import/sys/contrib/dev/acpica/include/actypes.h Fri Dec 29 12:47:23 2017 (r327338) @@ -651,8 +651,8 @@ typedef UINT64 ACPI_INTEGER; #define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p)) #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p)) -#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b))) -#define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) - (ACPI_SIZE)(b))) +#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_UINTPTR_T) (a) + (ACPI_SIZE)(b)) +#define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_UINTPTR_T) (a) - (ACPI_SIZE)(b)) #define ACPI_PTR_DIFF(a, b) (ACPI_SIZE) (ACPI_CAST_PTR (UINT8, (a)) - ACPI_CAST_PTR (UINT8, (b))) /* Pointer/Integer type conversions */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712291247.vBTClNxM009974>