Eliminate 'comparison is always false' static analyzer warning in finalize
authorIvan Maidanski <ivmai@mail.ru>
Wed, 28 Sep 2016 07:04:39 +0000 (10:04 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 28 Sep 2016 07:04:39 +0000 (10:04 +0300)
commit6783d150effd76f4e77111672ba6ba2c74e024d1
tree057a8221482026ada4c4b82a8e130b61eee0c021
parent7547c377153ddd859bef6a2dd14c42e9f12aa0be
Eliminate 'comparison is always false' static analyzer warning in finalize

GC_enqueue_all_finalizers code refactoring is done (removal of the
unreachable statement) to eliminate the warning.

* finalize.c (GC_enqueue_all_finalizers): Remove "prev_fo" local
variable; remove "register" keyword for local variables;
remove the pointer to the chain of hash table entries from the roots
(i.e. setting the roots pointer to null) at the beginning of processing
the chain (instead of updating the roots pointer on deletion of each
entry and finally setting it to null); remove fo_set_next(prev_fo) as
it is never called (because prev_fo was always null); update
GC_fo_entries only when the whole table processed (i.e. all items
removed).
finalize.c