From cccc969bc7f50a0f47f19bb8d195994630a500ea Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Sat, 19 May 2018 00:04:01 +0000 Subject: [PATCH] Silence non-actionable warnings in vendor code We can't modify vendor code so there's no signal in warnings from it. Similarly -Waddress-of-packed-member is not useful on networking code as access to packed structures is fundamental to its operation. --- sys/conf/files | 2 +- sys/conf/kern.mk | 9 +++++---- sys/modules/blake2/Makefile | 1 + sys/modules/crypto/Makefile | 4 ++-- sys/modules/drm2/i915kms/Makefile | 5 +++++ sys/modules/ipfilter/Makefile | 2 +- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 7df38c54141a..63cf65e5880c 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -565,7 +565,7 @@ contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ - compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter ${NO_WTAUTOLOGICAL_POINTER_COMPARE}" contrib/ipfilter/netinet/ip_sync.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet \ diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 8279b05a6efc..93789c5f06d2 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -18,12 +18,13 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ # a false positive. .if ${COMPILER_TYPE} == "clang" NO_WCONSTANT_CONVERSION= -Wno-error-constant-conversion -NO_WSHIFT_COUNT_NEGATIVE= -Wno-error-shift-count-negative -NO_WSHIFT_COUNT_OVERFLOW= -Wno-error-shift-count-overflow -NO_WSELF_ASSIGN= -Wno-error-self-assign +NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative +NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow +NO_WSELF_ASSIGN= -Wno-self-assign NO_WUNNEEDED_INTERNAL_DECL= -Wno-error-unneeded-internal-declaration NO_WSOMETIMES_UNINITIALIZED= -Wno-error-sometimes-uninitialized NO_WCAST_QUAL= -Wno-error-cast-qual +NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. @@ -34,7 +35,7 @@ CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \ CWARNEXTRA+= -Wno-error-shift-negative-value .endif .if ${COMPILER_VERSION} >= 40000 -CWARNEXTRA+= -Wno-error-address-of-packed-member +CWARNEXTRA+= -Wno-address-of-packed-member .endif CLANG_NO_IAS= -no-integrated-as diff --git a/sys/modules/blake2/Makefile b/sys/modules/blake2/Makefile index 66bdd56507be..48e890a9ba1b 100644 --- a/sys/modules/blake2/Makefile +++ b/sys/modules/blake2/Makefile @@ -87,4 +87,5 @@ WARNS ?= 6 .include CWARNFLAGS.blake2-dispatch.c += -Wno-unused-const-variable +CWARNFLAGS.blake2s-ref.c += -Wno-cast-qual -Wno-unused-function CWARNFLAGS += -Wno-cast-qual diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile index decf534b170c..d324a6994306 100644 --- a/sys/modules/crypto/Makefile +++ b/sys/modules/crypto/Makefile @@ -40,8 +40,8 @@ SRCS += blake2-sw.c CFLAGS.blake2b-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref CFLAGS.blake2s-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref CFLAGS.blake2-sw.c += -I${SRCTOP}/sys/crypto/blake2 -CWARNFLAGS.blake2b-ref.c += -Wno-cast-qual -CWARNFLAGS.blake2s-ref.c += -Wno-cast-qual +CWARNFLAGS.blake2b-ref.c += -Wno-cast-qual -Wno-unused-function +CWARNFLAGS.blake2s-ref.c += -Wno-cast-qual -Wno-unused-function SRCS += chacha.c SRCS += chacha-sw.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h diff --git a/sys/modules/drm2/i915kms/Makefile b/sys/modules/drm2/i915kms/Makefile index 32c19d873040..91e771901245 100644 --- a/sys/modules/drm2/i915kms/Makefile +++ b/sys/modules/drm2/i915kms/Makefile @@ -63,3 +63,8 @@ SRCS += \ CWARNFLAGS.i915_debug.c= -Wno-unused-function CWARNFLAGS.intel_lvds.c= -Wno-unused CWARNFLAGS.intel_tv.c= -Wno-unused +CWARNFLAGS.i915_gem.c= ${NO_WTAUTOLOGICAL_POINTER_COMPARE} +CWARNFLAGS.i915_gem_tiling.c= ${NO_WTAUTOLOGICAL_POINTER_COMPARE} +CWARNFLAGS.i915_gem_execbuffer.c= ${NO_WTAUTOLOGICAL_POINTER_COMPARE} +CWARNFLAGS.intel_display.c= ${NO_WTAUTOLOGICAL_POINTER_COMPARE} +CWARNFLAGS.intel_overlay.c= ${NO_WTAUTOLOGICAL_POINTER_COMPARE} diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile index d900c55e05d3..7f7e600ed621 100644 --- a/sys/modules/ipfilter/Makefile +++ b/sys/modules/ipfilter/Makefile @@ -21,7 +21,7 @@ CWARNFLAGS.fil.c= ${NO_WSELF_ASSIGN} -Wno-unused CWARNFLAGS.ip_auth.c= -Wno-unused CWARNFLAGS.ip_fil_freebsd.c= -Wno-unused CWARNFLAGS.ip_frag.c= -Wno-unused -CWARNFLAGS.ip_htable.c= -Wno-unused +CWARNFLAGS.ip_htable.c= -Wno-unused ${NO_WTAUTOLOGICAL_POINTER_COMPARE} CWARNFLAGS.ip_dstlist.c= -Wno-unused CWARNFLAGS.ip_lookup.c= ${NO_WSELF_ASSIGN} -Wno-unused CWARNFLAGS.ip_nat.c= -Wno-unused