From 4f89d9be869b81d559ca6d0fa9b1c1ec60e01db9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 1 Aug 2019 11:04:05 +0930 Subject: [PATCH] cppcheck: catch json_list_for_each cppcheck on bionic doesn't like this it seems. Signed-off-by: Rusty Russell --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 728ea333e..2183b0e50 100644 --- a/Makefile +++ b/Makefile @@ -330,7 +330,7 @@ check-includes: # cppcheck gets confused by list_for_each(head, i, list): thinks i is uninit. .cppcheck-suppress: - @git ls-files -- "*.c" "*.h" | grep -vE '^ccan/' | xargs grep -n 'list_for_each' | sed 's/\([^:]*:.*\):.*/uninitvar:\1/' > $@ + @git ls-files -- "*.c" "*.h" | grep -vE '^ccan/' | xargs grep -n '_for_each' | sed 's/\([^:]*:.*\):.*/uninitvar:\1/' > $@ check-cppcheck: .cppcheck-suppress @trap 'rm -f .cppcheck-suppress' 0; git ls-files -- "*.c" "*.h" | grep -vE '^ccan/' | xargs cppcheck -q --language=c --std=c11 --error-exitcode=1 --suppressions-list=.cppcheck-suppress --inline-suppr