public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH v2 0/4] Avoid running cppcheck on system headers
Date: Fri,  8 Nov 2024 13:53:26 +1100	[thread overview]
Message-ID: <20241108025330.3161314-1-david@gibson.dropbear.id.au> (raw)

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


             reply	other threads:[~2024-11-08  2:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08  2:53 David Gibson [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241108025330.3161314-1-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).