diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-02-08 20:46:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-02-08 20:46:08 +0000 |
commit | 5f2aca83940097d7d23b4137073fb601f8e74232 (patch) | |
tree | 206b049369330e32718d3b796059ea67af9451f5 /sys | |
parent | 7d8a4eb943a907a92dd400432c3c3adcbd93dad9 (diff) |
Disable clang 14 warning about bitwise operators in zstd
Parts of zstd, used in openzfs and other places, trigger a new clang 14
-Werror warning:
```
sys/contrib/zstd/lib/decompress/huf_decompress.c:889:25: error: use of bitwise '&' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
(BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
While the warning is benign, it should ideally be fixed upstream and
then vendor-imported, but for now silence it selectively.
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/conf/files | 2 | ||||
-rw-r--r-- | sys/conf/kern.mk | 3 | ||||
-rw-r--r-- | sys/modules/zfs/Makefile | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/sys/conf/files b/sys/conf/files index 148bd9f4f7b4..f002598d1c3d 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -702,7 +702,7 @@ contrib/zstd/lib/decompress/zstd_decompress.c optional zstdio compile-with ${ZST # See comment in sys/conf/kern.pre.mk contrib/zstd/lib/decompress/zstd_decompress_block.c optional zstdio \ compile-with "${ZSTD_C} ${ZSTD_DECOMPRESS_BLOCK_FLAGS}" -contrib/zstd/lib/decompress/huf_decompress.c optional zstdio compile-with ${ZSTD_C} +contrib/zstd/lib/decompress/huf_decompress.c optional zstdio compile-with "${ZSTD_C} ${NO_WBITWISE_INSTEAD_OF_LOGICAL}" # Blake 2 contrib/libb2/blake2b-ref.c optional crypto | !random_loadable random_fenestrasx \ compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index b009d64324da..4c497623bf7c 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -28,6 +28,9 @@ NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare .if ${COMPILER_VERSION} >= 100000 NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation .endif +.if ${COMPILER_VERSION} >= 140000 +NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical +.endif # 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. diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index b83a9a985fe2..d27e631b85fe 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -346,3 +346,4 @@ CFLAGS.zstd.c= -U__BMI__ -fno-tree-vectorize .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS.zstd.c+= -include ${SRCDIR}/zstd/include/aarch64_compat.h .endif +CFLAGS.zstd.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} |