From 61e3c072ac3679078e7c43dfe2db03663cef6326 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 5 Sep 2018 00:45:41 +0300 Subject: [PATCH] Really fix 'potential unsafe sign check of a bitwise operation' code defect (fix of commit af00c4d) * mark.c [!OS2] (GC_mark_from): Replace (signed_word)v>=0 to (v&SIGNB)==0 (anyway, the compiler generates the same code). --- mark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mark.c b/mark.c index 1159e3d..b1d5902 100644 --- a/mark.c +++ b/mark.c @@ -650,8 +650,8 @@ GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, # ifdef OS2 /* Use untweaked version to circumvent compiler problem */ while ((word)mark_stack_top >= (word)mark_stack && credit >= 0) # else - while ((signed_word)(((word)mark_stack_top - (word)mark_stack) - | (word)credit) >= 0) + while (((((word)mark_stack_top - (word)mark_stack) | (word)credit) + & SIGNB) == 0) # endif { current_p = mark_stack_top -> mse_start; -- 2.7.4