From owner-svn-src-projects@freebsd.org Fri Dec 29 12:47:25 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3CA3E8797F for ; Fri, 29 Dec 2017 12:47:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE2DF68A4A; Fri, 29 Dec 2017 12:47:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBTClNRG009975; Fri, 29 Dec 2017 12:47:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBTClNxM009974; Fri, 29 Dec 2017 12:47:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712291247.vBTClNxM009974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 29 Dec 2017 12:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327338 - projects/clang600-import/sys/contrib/dev/acpica/include X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/sys/contrib/dev/acpica/include X-SVN-Commit-Revision: 327338 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2017 12:47:25 -0000 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 */