diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-31 19:35:21 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-31 19:35:21 +0000 |
commit | 0a51af919165269e7fe82a972261a9180ab195a0 (patch) | |
tree | 4053819bbb8c771cb87f3dffef0d3a63b70853aa /sys/conf/files.amd64 | |
parent | 533a4a629626ef953d5f9d4414edc2db8c68d2f8 (diff) | |
download | src-0a51af919165269e7fe82a972261a9180ab195a0.tar.gz src-0a51af919165269e7fe82a972261a9180ab195a0.zip |
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.
MFC after: 3 days
Notes
Notes:
svn path=/projects/clang1000-import/; revision=357348
Diffstat (limited to 'sys/conf/files.amd64')
-rw-r--r-- | sys/conf/files.amd64 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 4942333ab587..10bb1516cf61 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -323,7 +323,8 @@ 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 +dev/tpm/tpm_crb.c optional tpm acpi \ + compile-with "${NORMAL_C} ${NO_WINT_IN_BOOL_CONTEXT}" dev/tpm/tpm_tis.c optional tpm acpi dev/tpm/tpm_acpi.c optional tpm acpi dev/tpm/tpm_isa.c optional tpm isa |