public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/4] RFC: Updates for cppcheck-2.12 warnings
@ 2023-09-29  5:50 David Gibson
  2023-09-29  5:50 ` [PATCH 1/4] cppcheck: Make many pointers const David Gibson
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: David Gibson @ 2023-09-29  5:50 UTC (permalink / raw)
  To: passt-dev, Stefano Brivio; +Cc: David Gibson

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.

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.

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.

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.

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

 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(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-05  6:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-29  5:50 [PATCH 0/4] RFC: Updates for cppcheck-2.12 warnings David Gibson
2023-09-29  5:50 ` [PATCH 1/4] cppcheck: Make many pointers const David Gibson
2023-09-29  5:50 ` [PATCH 2/4] conf: Remove overly cryptic selection of forward table David Gibson
2023-09-29  5:50 ` [PATCH 3/4] cppcheck: Use "exhaustive" level checking when available David Gibson
2023-09-29  5:50 ` [PATCH 4/4] cppcheck: Work around bug in cppcheck 2.12.0 David Gibson
2023-09-29  5:52 ` [PATCH 0/4] RFC: Updates for cppcheck-2.12 warnings David Gibson
2023-09-29 15:31 ` Stefano Brivio
2023-10-03  2:36   ` David Gibson
2023-10-05  6:19     ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).