From: Ivan Maidanski Date: Tue, 23 Oct 2012 03:57:48 +0000 (+0400) Subject: Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots X-Git-Tag: gc7_4_0~181 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4167db074ba2b1078007294fd351e514261ea087;p=gc Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots * mark_rts.c (GC_exclude_static_roots): Cast integer literal to pointer via word type (to eliminate compiler warning). --- diff --git a/mark_rts.c b/mark_rts.c index 8795a5b5..7ffe82a6 100644 --- a/mark_rts.c +++ b/mark_rts.c @@ -479,7 +479,7 @@ GC_API void GC_CALL GC_exclude_static_roots(void *b, void *e) /* Round boundaries (in direction reverse to that of GC_add_roots). */ b = (void *)((word)b & ~(sizeof(word) - 1)); e = (void *)(((word)e + (sizeof(word) - 1)) & ~(sizeof(word) - 1)); - if (0 == e) e = (void *)(~(sizeof(word) - 1)); /* handle overflow */ + if (0 == e) e = (void *)(word)(~(sizeof(word) - 1)); /* handle overflow */ LOCK(); GC_exclude_static_roots_inner(b, e);