From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 9AB715A026F for ; Fri, 29 Sep 2023 07:52:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1695966768; bh=iNCp6aI2gwpSC8UMewMvO97QkX0tRF9puIHWFllibn0=; h=Date:From:To:Subject:References:In-Reply-To:From; b=bfDrjqvDkAwpUB5JqY9q3KAWJbXNMI0grMSah6bs8PGtQ/rbsqPgw6sFdVaAlwkZo apGHGvkbpPUPXzHRefB2uOp197C4shlHkjSQjGZAD5XMWmNwuEX587hOYwWpQqTbuh rz4WEqWWe6ttsoh5uPgWUH2p8mipKRE2fRBseGus= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RxfdX10MJz4x7V; Fri, 29 Sep 2023 15:52:48 +1000 (AEST) Date: Fri, 29 Sep 2023 15:52:41 +1000 From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: Re: [PATCH 0/4] RFC: Updates for cppcheck-2.12 warnings Message-ID: References: <20230929055022.48624-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SD/TKI4nS4nWIDnc" Content-Disposition: inline In-Reply-To: <20230929055022.48624-1-david@gibson.dropbear.id.au> Message-ID-Hash: 5TLUXZL7BYANLR44UZRDXBJFQXE5ZPEW X-Message-ID-Hash: 5TLUXZL7BYANLR44UZRDXBJFQXE5ZPEW 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 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: --SD/TKI4nS4nWIDnc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 29, 2023 at 03:50:18PM +1000, David Gibson wrote: > cppcheck 2.12 (which Fedora 38 has updated, for one) introduces a > number of new warnings. Unfortunately, at least one of these is a > clear bug in cppcheck. >=20 > This series fixes a number of the new warnings reported in passt > (patches 1..3) and works around the remaining cppcheck bug (patch 4). > I'm pretty confident that patches 1 & 2 are safe and beneficial to > apply regardless of which cppcheck we're using. >=20 > Patch 3 is a little more dubious, because it potentially increases the > cppcheck runtime. On my system it doesn't seem to make a significant > difference, but that might not always stay true. >=20 > Patch 4 is a tricky one. It applies a specific suppression to work > around the cppcheck bug. That's necessary to get a pass with the > currently available cppcheck. However, it's ugly and we'd like to > remove it once the bug is fixed, but have no obvious way to remind us > to do that. What we want to do here kind of depends how long it takes > the bug to be fixed, which isn't clear at the moment. Forgot to mention that this was based on the siphash series, although I don't think it will have any conflicts. > David Gibson (4): > cppcheck: Make many pointers const > conf: Remove overly cryptic selection of forward table > cppcheck: Use "exhaustive" level checking when available > cppcheck: Work around bug in cppcheck 2.12.0 >=20 > Makefile | 6 ++++++ > conf.c | 25 +++++++++++-------------- > isolation.c | 2 +- > isolation.h | 2 +- > log.c | 6 +++--- > netlink.c | 6 +++--- > netlink.h | 6 +++--- > pasta.c | 4 ++-- > pasta.h | 2 +- > tap.c | 14 +++++++------- > tap.h | 6 +++--- > tcp.c | 25 ++++++++++++++++--------- > tcp_conn.h | 2 +- > tcp_splice.c | 5 +++-- > tcp_splice.h | 3 ++- > udp.c | 4 ++-- > udp.h | 2 +- > util.c | 5 +++-- > util.h | 4 ++-- > 19 files changed, 71 insertions(+), 58 deletions(-) >=20 --=20 David Gibson | 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 --SD/TKI4nS4nWIDnc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmUWZiAACgkQzQJF27ox 2GefAA/9EsPa/gjUPBpMc7qiND4+Werhd9ywDVdfWx/q1PKgtB0M266NIzUjbvGC ScamQrt2u3mBaSqA0A4tb5D2Z7w5WJUyv3uJvyN0oSOsFETJkDazwOCaDypSKj+m ZeYYug/jA76ohBkKEX1CfBcv0ic1AI7KOZ8X6zdOnCKcJjSnrGvoGCrkYy77krZT aYBItDE9NPVtXXrn23AEebJ3aThQVLJ+sW5MbCnvImZ1sK7ois/NszlOmtlEcQYb DeemWLiAFPgOu718GbziR1yOyq25/MO/5F334nrfFLE8ODy2/CQLIPX5HJSaavT1 Rx0gNQGaNX11MBeW2oyfL/FGNUCwq9lzCdQwM0Z4798hkhRM/YqC3eAQVa9pmy4O nUxhQYtBt1ddrOsrzUOIP+tdhowv84Ji8IJAiNPRTsWtcYSMXgduOnAUiCsq8I0f 9Hq7/vTqdb9NTh/+iFKHpSIwsWaj5rpVRnmU94POJMlsz3CYRQ8CH5MTFfEnwKaq 5LmZK/dOIrk55aEiWXzXba7RWyf8vPZUbEbPmf92zKD4xTcCXm4P+LMnk+pNOkMP iz+HqM+BO+br7ipNjDERKzmGOol0TzBIcTIYOAVWzQUmVcLZ1Ep6+y7/oaSpMkfT vmVOWsNwqGXr9j+OtEvCA2TGPcxQmTyptPrkEkRfD3NQfzMF3Aw= =t88N -----END PGP SIGNATURE----- --SD/TKI4nS4nWIDnc--