mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
check-cppcheck: autogen suppressions for all the list_for_each(_safe)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
0e0ad1aa4d
commit
a54872063f
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.dSYM
|
||||
.cppcheck-suppress
|
||||
TAGS
|
||||
ccan/tools/configurator/configurator
|
||||
ccan/ccan/cdump/tools/cdump-enumstr
|
||||
|
7
Makefile
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…
Reference in New Issue
Block a user