From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=GwZPj5Om; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id ADD6D5A061C for ; Wed, 06 Nov 2024 07:54:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1730876064; bh=0sOgVQSs9zpUq3ew2jg+lWd5aeTpIOP0YbuutQxd2Pg=; h=From:To:Cc:Subject:Date:From; b=GwZPj5OmB3vB6mHkY8jW/G0cF44bjE0poyI/zjUtDvX0DTpEelTyspzajWzpTgyEB 4jdD0/EVIkQvWtMzOg/3hJ8duhN+11lFbRTQOU59YwyaMNHkWo7ihQeKyCxsIlXYa+ xNrrDaIkzAZPvlxmU2M+Mw4aot3DdD/SkbRFxNBy+gbDGGFpJCBH3R0ad0G2OX5Mho ShI0Qt8B4buhEZTFgneKKLiRjRian8ZIAGinsjXIh432LAyxfG6AwdHiRlkp/qYNZe HtDEZJDtlijCg0lqDfdBzV1p5uQBggnVDntm0EyQePTFwNxzr0iVEuQAXzpZthU575 T78RzqpMxWfmg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Xjwt80K96z4x7D; Wed, 6 Nov 2024 17:54:24 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 0/8] Avoid running cppcheck on system headers Date: Wed, 6 Nov 2024 17:54:13 +1100 Message-ID: <20241106065421.2568179-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.47.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: NTM2YIKYC62XRYLNKTCB562EBTGGFI2D X-Message-ID-Hash: NTM2YIKYC62XRYLNKTCB562EBTGGFI2D 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 CC: David Gibson 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: 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