Eliminate 'possible loss of data' MS VC warning in disclaim_and_reclaim
authorIvan Maidanski <ivmai@mail.ru>
Fri, 21 Apr 2017 21:28:35 +0000 (00:28 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 21 Apr 2017 21:28:35 +0000 (00:28 +0300)
* reclaim.c [ENABLE_DISCLAIM] (GC_disclaim_and_reclaim): Change type
of bit_no local variable from int to word (matching that in other
GC_reclaim_* functions).

reclaim.c

index 8be53a0..1b26e92 100644 (file)
--- a/reclaim.c
+++ b/reclaim.c
@@ -222,7 +222,7 @@ STATIC ptr_t GC_reclaim_uninit(struct hblk *hbp, hdr *hhdr, size_t sz,
   STATIC ptr_t GC_disclaim_and_reclaim(struct hblk *hbp, hdr *hhdr, size_t sz,
                                        ptr_t list, signed_word *count)
   {
-    int bit_no = 0;
+    word bit_no = 0;
     word *p, *q, *plim;
     signed_word n_bytes_found = 0;
     struct obj_kind *ok = &GC_obj_kinds[hhdr->hb_obj_kind];