Skip to content
This repository was archived by the owner on Apr 17, 2020. It is now read-only.

Commit 302a78f

Browse files
m-schmoockrustyrussell
authored andcommitted
fix: add inline exception for recent cppcheck false positive
1 parent 5c0d658 commit 302a78f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ check-includes:
310310
@git ls-files -- "*.c" "*.h" | grep -vE '^ccan/' | xargs grep -n 'list_for_each' | sed 's/\([^:]*:.*\):.*/uninitvar:\1/' > $@
311311

312312
check-cppcheck: .cppcheck-suppress
313-
@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
313+
@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
314314

315315
check-shellcheck:
316316
@git ls-files -- "*.sh" | xargs shellcheck

gossipd/routing.c

+2
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,8 @@ u8 *handle_channel_announcement(struct routing_state *rstate,
900900
tal_add_destructor2(pending, destroy_pending_cannouncement, rstate);
901901

902902
/* Success */
903+
// MSC: Cppcheck 1.86 gets this false positive
904+
// cppcheck-suppress autoVariables
903905
*scid = &pending->short_channel_id;
904906
return NULL;
905907

0 commit comments

Comments
 (0)