From de82c38b7266eeac38a75a692a4d5201d7029eb5 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 8 Jan 2018 18:42:40 +0000 Subject: [PATCH] Add explanatory comment for r327622: clang 6.0.0 and higher warn about the ACPI_ROOT_OBJECT and ACPI_TO_POINTER macros from acpica's actypes.h header, that they use arithmetic on a null pointer treated as a cast from integer to pointer, which is a GNU extension. We turn off the warning, because this is in contributed code. Requested by: rakuco --- usr.sbin/acpi/acpidb/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/acpi/acpidb/Makefile b/usr.sbin/acpi/acpidb/Makefile index 493f2b897d06..513e03e8b5d5 100644 --- a/usr.sbin/acpi/acpidb/Makefile +++ b/usr.sbin/acpi/acpidb/Makefile @@ -81,6 +81,12 @@ LIBADD= pthread .include +# clang 6.0.0 and higher warn about the ACPI_ROOT_OBJECT and +# ACPI_TO_POINTER macros from sys/contrib/dev/acpica/include/actypes.h, +# that they use arithmetic on a null pointer treated as a cast from +# integer to pointer, which is a GNU extension. +# +# Turn off the warning, because this is in contributed code. .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 60000 CWARNFLAGS+= -Wno-null-pointer-arithmetic .endif