Browse Source

fix: add inline exception for recent cppcheck false positive

connected_hook
Michael Schmoock 6 years ago
committed by Rusty Russell
parent
commit
302a78f4eb
  1. 2
      Makefile
  2. 2
      gossipd/routing.c

2
Makefile

@ -310,7 +310,7 @@ check-includes:
@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
@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
check-shellcheck:
@git ls-files -- "*.sh" | xargs shellcheck

2
gossipd/routing.c

@ -900,6 +900,8 @@ u8 *handle_channel_announcement(struct routing_state *rstate,
tal_add_destructor2(pending, destroy_pending_cannouncement, rstate);
/* Success */
// MSC: Cppcheck 1.86 gets this false positive
// cppcheck-suppress autoVariables
*scid = &pending->short_channel_id;
return NULL;

Loading…
Cancel
Save