From bc7d20c424ee40e2572225615a92e0054b1dda6e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 13 Feb 2020 19:25:49 +0000 Subject: [PATCH] Disable new clang 10.0.0 warnings about misleading indentation in ce(4) and cp(4). These are false positives, since some of the driver source has been deliberately obfuscated. --- sys/conf/files.i386 | 5 +++-- sys/conf/kern.mk | 3 +++ sys/modules/ce/Makefile | 3 ++- sys/modules/cp/Makefile | 2 ++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 5aa9a4f3900e..9cf0060ea328 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -93,8 +93,9 @@ dev/agp/agp_via.c optional agp dev/ce/ceddk.c optional ce dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce \ - compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" -dev/cp/cpddk.c optional cp + compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION} ${NO_WMISLEADING_INDENTATION}" +dev/cp/cpddk.c optional cp \ + compile-with "${NORMAL_C} ${NO_WMISLEADING_INDENTATION}" dev/cp/if_cp.c optional cp dev/ctau/ctau.c optional ctau dev/ctau/ctddk.c optional ctau diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 56c0e76c25f6..0737f4203211 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -37,6 +37,9 @@ CWARNEXTRA+= -Wno-error-shift-negative-value .if ${COMPILER_VERSION} >= 40000 CWARNEXTRA+= -Wno-address-of-packed-member .endif +.if ${COMPILER_VERSION} >= 100000 +NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.endif .endif .if ${COMPILER_TYPE} == "gcc" diff --git a/sys/modules/ce/Makefile b/sys/modules/ce/Makefile index 05dd0bcc1124..e06340f29c2d 100644 --- a/sys/modules/ce/Makefile +++ b/sys/modules/ce/Makefile @@ -27,4 +27,5 @@ opt_ng_cronyx.h: .include -CWARNFLAGS.tau32-ddk.c= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.tau32-ddk.c+= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.tau32-ddk.c+= ${NO_WMISLEADING_INDENTATION} diff --git a/sys/modules/cp/Makefile b/sys/modules/cp/Makefile index 5a83f10955db..aaa505811459 100644 --- a/sys/modules/cp/Makefile +++ b/sys/modules/cp/Makefile @@ -26,3 +26,5 @@ opt_ng_cronyx.h: .endif .include + +CWARNFLAGS.cpddk.c+= ${NO_WMISLEADING_INDENTATION}