Eliminate 'label not used' cppcheck false warnings in GC_mark_X
authorIvan Maidanski <ivmai@mail.ru>
Tue, 28 Feb 2017 20:02:55 +0000 (23:02 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 28 Feb 2017 20:02:55 +0000 (23:02 +0300)
commite9cdef7958484c77addb654175812a96fcfe15a4
tree56c2e3f188cba4fa5a3c0db19d8de5c1740f0de8
parent631a74a7570dea14a77babd5561bf744b1598052
Eliminate 'label not used' cppcheck false warnings in GC_mark_X
(code refactoring of PUSH_CONTENTS[_HDR] to eliminate 'goto' statement)

* include/private/gc_hdrs.h (HC_GET_HDR): Remove exit_label argument;
replace goto with break; remove do-while(0) (as break is now used to
pass control to some place of the caller).
* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
* include/private/gc_pmark.h [!USE_MARK_BYTES] (OR_WORD_EXIT_IF_SET):
Likewise.
* include/private/gc_pmark.h (PUSH_CONTENTS, PUSH_CONTENTS_HDR):
Remove exit_label argument (and the comment about it).
* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Refine comment
about the exit.
* mark.c (GC_mark_from): Remove PUSH_CONTENTS exit<N> argument.
* typd_mlc.c (GC_typed_mark_proc): Likewise.
* mark.c (GC_mark_and_push, GC_mark_and_push_stack): Remove
PUSH_CONTENTS_HDR label argument and the label itself.
include/private/gc_hdrs.h
include/private/gc_pmark.h
mark.c
typd_mlc.c