diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2019-01-05 11:52:53 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2019-01-05 12:02:55 +0300 |
commit | 15a2763032ecaed12fcf2093b22e76fe47789169 (patch) | |
tree | 590aa27de052e70920a1e2773ea956274ffbaed1 /reclaim.c | |
parent | 0eb2a287093c50f0a1c9dc218029a8766a0cfa6d (diff) | |
download | bdwgc-15a2763032ecaed12fcf2093b22e76fe47789169.tar.gz |
Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
(fix of commits 7e59301c1, 06ecaefca)
* alloc.c [!NO_CLOCK] (GC_start_time): Initialize to
CLOCK_TYPE_INITIALIZER (instead of 0).
* alloc.c [!NO_CLOCK] (GC_try_to_collect_inner, GC_stopped_mark,
GC_finish_collection): Initialize local variable of CLOCK_TYPE type to
CLOCK_TYPE_INITIALIZER (instead of 0); remove comment (duplicating that
in gc_priv.h).
* reclaim.c [!NO_CLOCK] (GC_reclaim_all): Likewise.
* include/private/gc_priv.h [!NO_CLOCK] (CLOCK_TYPE_INITIALIZER):
Define macro.
Diffstat (limited to 'reclaim.c')
-rw-r--r-- | reclaim.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -722,7 +722,7 @@ GC_INNER GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old) struct hblk ** rlp; struct hblk ** rlh; # ifndef NO_CLOCK - CLOCK_TYPE start_time = 0; /* initialized to prevent warning. */ + CLOCK_TYPE start_time = CLOCK_TYPE_INITIALIZER; if (GC_print_stats == VERBOSE) GET_TIME(start_time); |