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=ngJEHEAB; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 0D4515A004E for ; Wed, 06 Nov 2024 00:27:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1730849254; bh=qorK27XBvLtQC9LPnY+T1PttV0pqqTESeVEJgjlPkUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ngJEHEABvjDj3hpQ16nZR/dTwh2PTm873RWdPaapbcl5yyBJP3WRg997QNg2DrFPD FzjXJAYz1SW26AzSA/IWCxj8WPhk8UzLf/Gsgxx/niaePhOA7i7QE/Cn6YVhkL+XpB FnKZRPI1j10Rv2OEhX6J4MMHf5R4QYdsPsZGgkh06CZQplb9xUXRV7fesBiuu/3v+n SDt3jDxXse/dveWRkhb5BbF7LziJzPEF7HyUlnoqJdOa/HHVf+Lx88+GIhZ41uXA8y EdAU+0K+M/7DH7R36NRPBVkq9x9qAuDLgc3J2Y+3BJ+sCfh2EUmLjl7QnMP11uVVS1 pwbdaOYhlkWCQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XjkyZ3p19z4x8p; Wed, 6 Nov 2024 10:27:34 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 02/12] Makefile: Simplify exclusion of qrap from static checks Date: Wed, 6 Nov 2024 10:25:18 +1100 Message-ID: <20241105232528.1408144-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241105232528.1408144-1-david@gibson.dropbear.id.au> References: <20241105232528.1408144-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: TDBGKV2IUCUCBMXVEH7ZLVWEECQLLWV2 X-Message-ID-Hash: TDBGKV2IUCUCBMXVEH7ZLVWEECQLLWV2 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: There are things in qrap.c that clang-tidy complains about that aren't worth fixing. So, we currently exclude it using $(filter-out). However, we already have a make variable which has just the passt sources, excluding qrap, so we can use that instead of the awkward filter-out expression. Currently, we still include qrap.c for cppcheck, but there's not much point doing so: it's, well, qrap, so we don't care that much about lints. Exclude it from cppcheck as well, for consistency. Signed-off-by: David Gibson --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c1c6e30..8e14309 100644 --- a/Makefile +++ b/Makefile @@ -262,7 +262,7 @@ docs: README.md # parentheses to reinforce that certainly won't improve readability. -clang-tidy: $(filter-out qrap.c,$(SRCS)) $(HEADERS) +clang-tidy: $(PASST_SRCS) $(HEADERS) clang-tidy -checks=*,-modernize-*,\ -clang-analyzer-valist.Uninitialized,\ -cppcoreguidelines-init-variables,\ @@ -290,14 +290,14 @@ clang-tidy: $(filter-out qrap.c,$(SRCS)) $(HEADERS) -cppcoreguidelines-macro-to-enum,\ -readability-math-missing-parentheses \ -config='{CheckOptions: [{key: bugprone-suspicious-string-compare.WarnOnImplicitComparison, value: "false"}]}' \ - --warnings-as-errors=* $(filter-out qrap.c,$(SRCS)) -- $(filter-out -pie,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) -DCLANG_TIDY_58992 + --warnings-as-errors=* $(PASST_SRCS) -- $(filter-out -pie,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) -DCLANG_TIDY_58992 SYSTEM_INCLUDES := /usr/include $(wildcard /usr/include/$(TARGET)) ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version"),1) VER := $(shell $(CC) -dumpversion) SYSTEM_INCLUDES += /usr/lib/gcc/$(TARGET)/$(VER)/include endif -cppcheck: $(SRCS) $(HEADERS) +cppcheck: $(PASST_SRCS) $(HEADERS) if cppcheck --check-level=exhaustive /dev/null > /dev/null 2>&1; then \ CPPCHECK_EXHAUSTIVE="--check-level=exhaustive"; \ else \ @@ -313,4 +313,4 @@ cppcheck: $(SRCS) $(HEADERS) --inline-suppr \ --suppress=unusedStructMember \ $(filter -D%,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) \ - $(SRCS) $(HEADERS) + $(PASST_SRCS) $(HEADERS) -- 2.47.0