Browse Source

check-cppcheck: autogen suppressions for all the list_for_each(_safe)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
a54872063f
  1. 1
      .gitignore
  2. 7
      Makefile

1
.gitignore

@ -7,6 +7,7 @@
*.gcda
*.gcno
*.dSYM
.cppcheck-suppress
TAGS
ccan/tools/configurator/configurator
ccan/ccan/cdump/tools/cdump-enumstr

7
Makefile

@ -258,6 +258,13 @@ check-python:
check-includes:
@tools/check-includes.sh
# 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/' > $@
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
check-source: check-makefile check-source-bolt check-whitespace check-markdown check-spelling check-python check-includes
full-check: check check-source

Loading…
Cancel
Save