From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=quarantine dis=none) header.from=redhat.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 7578F5A0269 for ; Fri, 20 Nov 2026 02:32:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795138374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ale4pHxjrW+5oDYxj9D+hZq4lgKs0ZqFldyiFDvZ7YQ=; b=drkEw+XUcBC7K8fCup51uksdZCCqIBnDbLpVcB3shJR6VmQmRs5eCI6Mro+XvSQmHXDtAB ZmfF1Gcz5+G23p37Byf+xoJgPPe93+4Qjxel9s6AafL8leHlH/JUfbgx5SRd/Nn3sbiSGB ICb01efkToojld+NeRl6OG+gQwMSD+A= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-138-dEpTq8aqPiaiaVS1CxLBJg-1; Fri, 20 Nov 2026 01:32:52 +0000 X-MC-Unique: dEpTq8aqPiaiaVS1CxLBJg-1 X-Mimecast-MFC-AGG-ID: dEpTq8aqPiaiaVS1CxLBJg_1795138371 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 95E631956068; Fri, 20 Nov 2026 01:32:51 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C60901801974; Fri, 20 Nov 2026 01:32:50 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, david@gibson.dropbear.id.au, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH 1/3] clang-tidy: Also disable bugprone-signed-bitwise Date: Thu, 19 Nov 2026 20:32:46 -0500 Message-ID: <20261120013248.1472649-2-jmaloy@redhat.com> In-Reply-To: <20261120013248.1472649-1-jmaloy@redhat.com> References: <20261120013248.1472649-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fnoMvbpWSLW97FxReomZfkZpyWp93NCpB8lkZwIyRmA_1795138371 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 2PCPUCUP4ZD3MDQ3VDTGFWPEHFHROI7W X-Message-ID-Hash: 2PCPUCUP4ZD3MDQ3VDTGFWPEHFHROI7W X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- .clang-tidy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 9ba43bf0..ec570f2d 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" -- 2.56.1