public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/8] Avoid running cppcheck on system headers
@ 2024-11-06  6:54 David Gibson
  2024-11-06  6:54 ` [PATCH 1/8] linux_dep: Generalise tcp_info.h to handling Linux extension compatibility David Gibson
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: David Gibson @ 2024-11-06  6:54 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

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.

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.

This is based on my earlier series with clangd configuration and
fixes.

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

 Makefile                  | 17 ++---------------
 tcp_info.h => linux_dep.h | 32 ++++++++++++++++++++++++++++----
 log.c                     |  9 +--------
 ndp.c                     |  4 ++--
 tcp.c                     |  2 +-
 udp.c                     |  5 +++--
 util.h                    | 29 ++++++++++-------------------
 7 files changed, 47 insertions(+), 51 deletions(-)
 rename tcp_info.h => linux_dep.h (85%)

-- 
2.47.0


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

end of thread, other threads:[~2024-11-08  2:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-06  6:54 [PATCH 0/8] Avoid running cppcheck on system headers David Gibson
2024-11-06  6:54 ` [PATCH 1/8] linux_dep: Generalise tcp_info.h to handling Linux extension compatibility David Gibson
2024-11-06  6:54 ` [PATCH 2/8] log: Only check for FALLOC_FL_COLLAPSE_RANGE availability at runtime David Gibson
2024-11-06 19:10   ` Stefano Brivio
2024-11-06 20:54     ` David Gibson
2024-11-06  6:54 ` [PATCH 3/8] linux_dep: Move close_range() conditional handling to linux_dep.h David Gibson
2024-11-06 19:10   ` Stefano Brivio
2024-11-06 20:56     ` David Gibson
2024-11-06  6:54 ` [PATCH 4/8] linux_dep: Fix CLOSE_RANGE_UNSHARE availability handling David Gibson
2024-11-06 19:12   ` Stefano Brivio
2024-11-06 21:01     ` David Gibson
2024-11-07  7:03       ` Stefano Brivio
2024-11-06  6:54 ` [PATCH 5/8] ndp: Use const pointer for ndp_ns packet David Gibson
2024-11-06  6:54 ` [PATCH 6/8] udp: Don't dereference uflow before NULL check in udp_reply_sock_handler() David Gibson
2024-11-06  6:54 ` [PATCH 7/8] util: Work around cppcheck bug 6936 David Gibson
2024-11-06  6:54 ` [PATCH 8/8] cppcheck: Don't check the system headers David Gibson
2024-11-07 14:55 ` [PATCH 0/8] Avoid running cppcheck on " Stefano Brivio
2024-11-07 23:58   ` David Gibson

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