]> granicus.if.org Git - gc/commitdiff
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>
Wed, 24 May 2017 22:30:14 +0000 (01:30 +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 a332ef67bcde1fc2a5786d74fb28c00861ce2e3d..f2bc8b292b8a7ef7b620b681aa0ef4387f331cf3 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];