diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-12 06:52:31 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-09-20 07:04:10 +0000 |
commit | 08862a1a5e14d49c221999a82e2a52690f918a97 (patch) | |
tree | cbd05c46d2736ba2ffb904c3dba85c6fecce5281 /sys/net/if_ethersubr.c | |
parent | e21f1fa8fa98506b1bfb195b02132a84549e89a2 (diff) | |
download | src-08862a1a5e14d49c221999a82e2a52690f918a97.tar.gz src-08862a1a5e14d49c221999a82e2a52690f918a97.zip |
Fix geom build with clang 17 and KTR enabled
When building a kernel with clang 17 and KTR enabled, such as with the
LINT configurations, a -Werror warning is emitted:
sys/geom/geom_io.c:145:31: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand]
145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~ ^
sys/geom/geom_io.c:145:31: note: use '&' for a bitwise operation
145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
| ^~
| &
sys/geom/geom_io.c:145:31: note: remove constant to silence this warning
Replace the multiple uses of the expression with one macro, and in this
macro use "!= 0" to get a logical operand instead of a bitwise one.
Reviewed by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41823
(cherry picked from commit 479d224efcbf0115f8cd84314fcc46cbac146a1d)
Diffstat (limited to 'sys/net/if_ethersubr.c')
0 files changed, 0 insertions, 0 deletions