The entitled cppcheck warnings are false positives.
* alloc.c (GC_should_collect): Move reassignment of the global variable
which is checked in the conditional expression to the end of the
conditional block statement.
* finalize.c (GC_notify_or_invoke_finalizers): Likewise.
* mark.c [WRAP_MARK_SOME] (GC_mark_some): Likewise.
static word last_min_bytes_allocd;
static word last_gc_no;
if (last_gc_no != GC_gc_no) {
- last_gc_no = GC_gc_no;
last_min_bytes_allocd = min_bytes_allocd();
+ last_gc_no = GC_gc_no;
}
return(GC_adj_bytes_allocd() >= last_min_bytes_allocd
|| GC_heapsize >= GC_collect_at_heapsize);
/* These variables require synchronization to avoid data races. */
if (last_finalizer_notification != GC_gc_no) {
- last_finalizer_notification = GC_gc_no;
notifier_fn = GC_finalizer_notifier;
+ last_finalizer_notification = GC_gc_no;
}
UNLOCK();
if (notifier_fn != 0)
/* Warn about it at most once per collection. */
if (warned_gc_no != GC_gc_no) {
- warned_gc_no = GC_gc_no;
WARN("Caught ACCESS_VIOLATION in marker;"
" memory mapping disappeared\n", 0);
+ warned_gc_no = GC_gc_no;
}
}
/* We have bad roots on the stack. Discard mark stack. */