mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
cppcheck: catch json_list_for_each
cppcheck on bionic doesn't like this it seems. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
1510ea5717
commit
4f89d9be86
2
Makefile
2
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
|
||||
|
||||
Reference in New Issue
Block a user