From 4f656c0f08e0ab36df88a52c6b36f4ac3dc419d2 Mon Sep 17 00:00:00 2001 From: Jon Maloy Date: Thu, 19 Nov 2026 20:32:46 -0500 Subject: 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 Signed-off-by: Stefano Brivio --- .clang-tidy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3