diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2019-04-23 22:21:54 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2019-04-23 22:21:54 +0300 |
commit | fa8b492e30a8161416c9362843c21d049735b848 (patch) | |
tree | 9e94f6901b011557c9722ce94e94bdf8394e8d08 /finalize.c | |
parent | a8c5ee41a95a1a541f088582de909f537a6827d9 (diff) | |
download | bdwgc-fa8b492e30a8161416c9362843c21d049735b848.tar.gz |
Workaround 'duplicate expression for condition and assignment' cppcheck FP
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.
Diffstat (limited to 'finalize.c')
-rw-r--r-- | finalize.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1368,8 +1368,8 @@ GC_INNER void GC_notify_or_invoke_finalizers(void) /* 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) |