From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=acfGa5qe; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id CC6965A061A for ; Fri, 08 Nov 2024 03:23:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1731032623; bh=q1MkPV0+XQ6E332gMdG1/XL0sEfkd5vQnTsac7IzFkg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=acfGa5qe7/xOAIQ/Zda+IUHFVFyOCibXApVG72b4dOw62rz27ZgnOiumpSVsTSNU0 8i87DAWqbAsAMZYDiAh0ez8Evoc5SLMoHXQd9uXt70FerWoMdKyA1MAMojoGC3alc3 Y38oO5gT0RYXEqp9IItkrj2DdNYIRLzYsJVp8BkuLByA7aNJ01n4gXCUo1dJljEjIO z9afnKl0l4R0ru5Ebsi0nsfq56ocZAHBaaicBNmpyy6N/vUWJekjHCPAq1dcqvFWUg zWokbTH2AzI3N8qBKDDeKpy9JFPkHUXoJR+CF1YXfTZc1rBIuT42HE6QkomaT8fmI0 HbkU9M1iaoTRQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Xl2mv1vCQz4x1w; Fri, 8 Nov 2024 13:23:43 +1100 (AEDT) Date: Fri, 8 Nov 2024 10:58:05 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 0/8] Avoid running cppcheck on system headers Message-ID: References: <20241106065421.2568179-1-david@gibson.dropbear.id.au> <20241107155516.37ce6d1f@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GiAu0UiBLf6ogltY" Content-Disposition: inline In-Reply-To: <20241107155516.37ce6d1f@elisabeth> Message-ID-Hash: ZLBXDOA4Y2Y2EL2RHYI7OAZX2AD3FTKG X-Message-ID-Hash: ZLBXDOA4Y2Y2EL2RHYI7OAZX2AD3FTKG X-MailFrom: dgibson@gandalf.ozlabs.org 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 CC: passt-dev@passt.top 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: --GiAu0UiBLf6ogltY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 07, 2024 at 03:55:16PM +0100, Stefano Brivio wrote: > On Wed, 6 Nov 2024 17:54:13 +1100 > David Gibson wrote: >=20 > > It turns out cppcheck has inbuilt knowledge of the C library, and > > isn't typically given the system headers. Avoiding doing so reduces > > the runtime to less than half of what it currently is. > >=20 > > For non-obvious reasons, this change also exposes some new warnings. > > Some are real, one is a cppcheck bug. Fix and/or workaround these > > then make the change to the cppcheck options. > >=20 > > This is based on my earlier series with clangd configuration and > > fixes. > >=20 > > David Gibson (8): > > linux_dep: Generalise tcp_info.h to handling Linux extension > > compatibility > > log: Only check for FALLOC_FL_COLLAPSE_RANGE availability at runtime > > linux_dep: Move close_range() conditional handling to linux_dep.h > > linux_dep: Fix CLOSE_RANGE_UNSHARE availability handling > > ndp: Use const pointer for ndp_ns packet > > udp: Don't dereference uflow before NULL check in > > udp_reply_sock_handler() > > util: Work around cppcheck bug 6936 > > cppcheck: Don't check the system headers >=20 > Applied, except for 2/8, 3/8, 4/8, and 8/8. >=20 > I had to skip 8/8 as well for the moment because, contrary to what I > reported earlier by mistake, it's actually the one leading to the new > cppcheck warning: >=20 > dhcpv6.c:334:14: style: The comparison 'ia_type =3D=3D 3' is always true.= [knownConditionTrueFalse] > if (ia_type =3D=3D OPT_IA_NA) { >=20 > ...also on x86. The difference is not the architecture, rather the > cppcheck version: it happens with 2.16.x but not with 2.14.x. >=20 > I'm posting a patch for that soon. Oh, interesting. 8/8 exposed several new warnings for me too (hence most of this series), but not that one. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --GiAu0UiBLf6ogltY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmctVAgACgkQzQJF27ox 2GelUw//SuW6BLSuzwD2jNPd/Rdtb+Ivxkhb/BDDXcgvSksBXDoi7trKuzHkDx3X daD205cWILoIE8lMz84PguAMK2NVgxayAOhW40MfnWQAkvybPep0USF1Exu9YgVZ mQ6Or3MsdlF1d3qCtMX4pmwWGwkuGwVz03EbJZ9OWIkmZ/3DjKfzqKHBSuEyq/GD ltvfyIboVOiL9onBFclPmpvqYP1sHGXDUuElDqWOlZVRhPsI0T+f6aug4b8b9PJh eJ0IWPYiJJUK2oWFF9+pdE7io1fIBAYN713803BM1YALz/DKiOkG/gLTR3bXkB0H 7QiNTJHpN7VlO6uQNRgp3oThkMfXqIt0qZUljaqBDC2+KMFn0Iprs2Qc7ig7c17f oSmxgKCmg+OOy9qPxA6N2CJQcCqzoUDEovwCoYqrPFhHyvJLLWJnVi8hWkcHp9RI 3YSacdSVUPfQtGiWuhEDPbx9qROx3fY014EbHMKKactRNhuaY9R3bs46IQYFDOgO YN1EvqJE1QXzF+ZsK6xyVD+bJnO5rlupD+pUlLz0UVypok3YhZoZxbnKQ6hUIYEA 1Hb9AUSR/6l0ucqOhxDzdDxNx7kPHEWf5INd/KXkd10N22WCQWo7zhyjwQAITs0/ o/UOvrrSShATIUjBevpa7P/2b3bTWcivX4Kpiv2n4G036Ckv2G4= =MKOJ -----END PGP SIGNATURE----- --GiAu0UiBLf6ogltY--