diff options
| author | Jon Maloy <jmaloy@redhat.com> | 2026-11-19 20:32:46 -0500 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-11-22 22:06:10 +0100 |
| commit | 4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2 (patch) | |
| tree | 3a0d0f91f7a1f84ea252db90d0c4a8fcfe074163 | |
| parent | 5fa9ecd998d8c66882dead33c44b53be4316924b (diff) | |
| download | passt-4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2.tar passt-4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2.tar.gz passt-4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2.tar.bz2 passt-4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2.tar.lz passt-4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2.tar.xz passt-4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2.tar.zst passt-4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2.zip | |
clang-tidy: Also disable bugprone-signed-bitwise
The hicpp-signed-bitwise check is disabled in .clang-tidy, as we need
bitwise operations on signed values for syscalls, epoll_wait() flags,
etc.
clang-tidy 23 removed the hicpp module, moving its checks to other
modules, and hicpp-signed-bitwise became bugprone-signed-bitwise. The
existing exclusion therefore no longer applies, and as we enable all
checks and treat warnings as errors, 'make clang-tidy' fails with
clang-tidy 23.1.5, e.g.:
arp.c:139:37: error: use of a signed integer operand with a binary
bitwise operator [bugprone-signed-bitwise,-warnings-as-errors]
139 | a = fwd_get_addr(c, AF_INET, true, CONF_ADDR_ANY);
where CONF_ADDR_ANY is built from BIT(n), that is, (1UL << (n)), and
the shift count is a signed int.
Disable the check under its new name as well, keeping the old one for
older clang-tidy versions.
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | .clang-tidy | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/.clang-tidy b/.clang-tidy index 9ba43bf..ec570f2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -26,8 +26,10 @@ Checks: # TODO: this is Linux-only for the moment, nice to fix eventually - "-llvmlibc-restrict-system-libc-headers" - # Those are needed for syscalls, epoll_wait flags, etc. + # Those are needed for syscalls, epoll_wait flags, etc. Moved + # from hicpp to bugprone as clang-tidy 23 dropped the hicpp module - "-hicpp-signed-bitwise" + - "-bugprone-signed-bitwise" # Probably not doable to impement this without plain memcpy(), memset() - "-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling" |
