From: Ivan Maidanski Date: Wed, 17 Feb 2016 09:09:12 +0000 (+0300) Subject: Prevent code analysis tool warning about GC_base unchecked result X-Git-Tag: gc7_6_0~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70fbfadd3842c828ae9dd10ef3212a2d0957ca86;p=gc Prevent code analysis tool warning about GC_base unchecked result * mark.c (GC_mark_and_push_stack): Add assertion on GC_base result is non-null (before use in HDR). --- diff --git a/mark.c b/mark.c index 131efd94..d669afdf 100644 --- a/mark.c +++ b/mark.c @@ -1417,6 +1417,7 @@ GC_API struct GC_ms_entry * GC_CALL GC_mark_and_push(void *obj, if (EXPECT(IS_FORWARDING_ADDR_OR_NIL(hhdr), FALSE)) { if (hhdr != 0) { r = GC_base(p); + GC_ASSERT(r != NULL); /* to prevent a warning */ hhdr = HDR(r); } if (hhdr == 0) {