public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/4] Avoid running cppcheck on system headers
@ 2024-11-08  2:53 David Gibson
  2024-11-08  2:53 ` [PATCH v2 1/4] log: Only check for FALLOC_FL_COLLAPSE_RANGE availability at runtime David Gibson
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: David Gibson @ 2024-11-08  2:53 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.

v2:
 * Dropped patches already merged
 * Rebased on Stefano's series of lint fixes
 * Add a missing #include in 1/4 and 2/4
 * Adjust 3/4 not to die if close_range() is unavailable

David Gibson (4):
  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
  cppcheck: Don't check the system headers

 Makefile    | 15 +--------------
 linux_dep.h | 22 ++++++++++++++++++++++
 log.c       | 10 ++--------
 util.c      | 17 +++++++++++++++--
 util.h      | 19 -------------------
 5 files changed, 40 insertions(+), 43 deletions(-)

-- 
2.47.0


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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-08  2:53 [PATCH v2 0/4] Avoid running cppcheck on system headers David Gibson
2024-11-08  2:53 ` [PATCH v2 1/4] log: Only check for FALLOC_FL_COLLAPSE_RANGE availability at runtime David Gibson
2024-11-08  2:53 ` [PATCH v2 2/4] linux_dep: Move close_range() conditional handling to linux_dep.h David Gibson
2024-11-08  2:53 ` [PATCH v2 3/4] linux_dep: Fix CLOSE_RANGE_UNSHARE availability handling David Gibson
2024-11-08  2:53 ` [PATCH v2 4/4] cppcheck: Don't check the system headers David Gibson
2024-11-08  9:27 ` [PATCH v2 0/4] Avoid running cppcheck on " 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).