Workaround 'possible null pointer dereference' cppcheck warnings
authorIvan Maidanski <ivmai@mail.ru>
Tue, 18 Oct 2016 09:04:52 +0000 (12:04 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 18 Oct 2016 09:17:25 +0000 (12:17 +0300)
commitdd13a1fc1ef0c374134824dfff8dcf05cdc2069c
treed1b70b1cf014a676b6871bb0aaa4b966e58d74fb
parent0dc00633da6b1477e50184adda968dff6d862d50
Workaround 'possible null pointer dereference' cppcheck warnings

* include/private/gc_priv.h (GC_on_abort): Move definition upper (to be
before ABORT definition); define it to empty if PCR (this is needed for
CPPCHECK).
* include/private/gc_priv.h (ABORT): Specially define to
{GC_on_abort(msg);abort();} block statement if CPPCHECK.
* tests/test.c (chktree): Check for n is zero only once; add comment.
include/private/gc_priv.h
tests/test.c