From 0198fc002b7ea202c18da86888d242fd663d2c42 Mon Sep 17 00:00:00 2001 From: Ondrej Mosnacek Date: Wed, 26 Jul 2023 10:32:34 +0200 Subject: [PATCH] Prevent cppcheck from defining CHECK_DIR Recent versions of cppcheck fail with a syntax error when they check apps/kcapi-hasher.c with CHECK_DIR defined (probably they now define it to 1 instead of an empty value). To fix it, instruct cppcheck to only check with CHECK_DIR left undefined. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2225970 Signed-off-by: Ondrej Mosnacek --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 0a6ff26..0189848 100644 --- a/Makefile.am +++ b/Makefile.am @@ -241,7 +241,7 @@ endif if HAVE_CPPCHECK cppcheck: - $(CPPCHECK) --error-exitcode=42 --enable=performance,warning,portability $(sort $(SCAN_FILES)) + $(CPPCHECK) -U CHECK_DIR --error-exitcode=42 --enable=performance,warning,portability $(sort $(SCAN_FILES)) endif if HAVE_MKTEMP