aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-02-01 16:57:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-02-01 16:57:04 +0000
commitf6d5b31f8b3cf53bcf3ab7c12120c00f29de87b9 (patch)
treea672a6006c61a20dac338256bf9c27cd21f2e38b /sys/conf
parent7bde621ba35d45eeac3cbcb147bdbcabf5d4a575 (diff)
downloadsrc-f6d5b31f8b3cf53bcf3ab7c12120c00f29de87b9.tar.gz
src-f6d5b31f8b3cf53bcf3ab7c12120c00f29de87b9.zip
Revert r357349, since the clang 10.0.0 warning was actually correct, and
the ! operator should have been a ~ instead: Merge r357348 from the clang 10.0.0 import branch: Disable new clang 10.0.0 warnings about converting the result of shift operations to a boolean in tpm(4): sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context] WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD); ^ sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 'TPM_CRB_CTRL_CANCEL_CMD' #define TPM_CRB_CTRL_CANCEL_CMD BIT(0) ^ sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT' #define BIT(x) (1 << (x)) ^ Such warnings can be useful in C++ contexts, but not so much in kernel drivers, where this type of bit twiddling is commonplace. So disable it for this case. Noticed by: cem MFC after: 3 days
Notes
Notes: svn path=/head/; revision=357366
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files.amd643
-rw-r--r--sys/conf/kern.mk3
2 files changed, 1 insertions, 5 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 10bb1516cf61..4942333ab587 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -323,8 +323,7 @@ dev/syscons/scvesactl.c optional sc vga vesa
dev/syscons/scvgarndr.c optional sc vga
dev/tpm/tpm.c optional tpm
dev/tpm/tpm20.c optional tpm
-dev/tpm/tpm_crb.c optional tpm acpi \
- compile-with "${NORMAL_C} ${NO_WINT_IN_BOOL_CONTEXT}"
+dev/tpm/tpm_crb.c optional tpm acpi
dev/tpm/tpm_tis.c optional tpm acpi
dev/tpm/tpm_acpi.c optional tpm acpi
dev/tpm/tpm_isa.c optional tpm isa
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 61867dd8e725..1e29b58663d4 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -37,9 +37,6 @@ CWARNEXTRA+= -Wno-error-shift-negative-value
.if ${COMPILER_VERSION} >= 40000
CWARNEXTRA+= -Wno-address-of-packed-member
.endif
-.if ${COMPILER_VERSION} >= 100000
-NO_WINT_IN_BOOL_CONTEXT= -Wno-int-in-bool-context
-.endif
.endif
.if ${COMPILER_TYPE} == "gcc"