Skip to content

Commit

Permalink
Workaround 'GC_parallel_mark_disabled is always false' cppcheck FP
Browse files Browse the repository at this point in the history
* mark.c [PARALLEL_MARK] (GC_parallel_mark_disabled): Move global
variable definition down to be below GC_mark_some_inner().
  • Loading branch information
ivmai committed Aug 1, 2024
1 parent cc1bd3b commit 4f97540
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ GC_INNER struct obj_kind GC_obj_kinds[MAXOBJKINDS] = {
/* etc. Used for logging only. */
#endif

#ifdef PARALLEL_MARK
GC_INNER GC_bool GC_parallel_mark_disabled = FALSE;
#endif

GC_API void GC_CALL GC_set_pointer_mask(GC_word value)
{
# ifdef DYNAMIC_POINTER_MASK
Expand Down Expand Up @@ -517,6 +513,10 @@ GC_API GC_on_mark_stack_empty_proc GC_CALL GC_get_on_mark_stack_empty(void)
return FALSE;
}

#ifdef PARALLEL_MARK
GC_INNER GC_bool GC_parallel_mark_disabled = FALSE;
#endif

#ifdef WRAP_MARK_SOME
GC_INNER GC_bool GC_mark_some(ptr_t cold_gc_frame)
{
Expand Down

0 comments on commit 4f97540

Please sign in to comment.