From 3acde978398b145b1e2d8900de634ca9d75ada18 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 21 Jul 2017 18:17:06 +0300 Subject: [PATCH] Eliminate CSA warning about incorrect cast applied to HBLK_OBJS HBLK_OBJS() expects the argument value and has the result value of size_t type. * reclaim.c (GC_print_block_descr): Cast result of HBLK_OBJS() to unsigned int instead of casting its argument. --- reclaim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reclaim.c b/reclaim.c index d307005..2361406 100644 --- a/reclaim.c +++ b/reclaim.c @@ -538,7 +538,7 @@ STATIC void GC_print_block_descr(struct hblk *h, size_t bytes = hhdr -> hb_sz; struct Print_stats *ps; unsigned n_marks = GC_n_set_marks(hhdr); - unsigned n_objs = HBLK_OBJS((unsigned)bytes); + unsigned n_objs = (unsigned)HBLK_OBJS(bytes); if (0 == n_objs) n_objs = 1; if (hhdr -> hb_n_marks != n_marks) { -- 2.7.4