From 7f6691ae77546b42a4b182ca5ddbf5e2312c6a7b Mon Sep 17 00:00:00 2001 From: shyouhei Date: Tue, 13 Nov 2018 00:40:52 +0000 Subject: suppress integer overflow warnings * random.c: annotate rb_hash_start with NO_SANITIZE (seed.key.hash + h overflows and that seems intentional) * bignum.c: avoid (size_t)-- * cont.c: ditto * util.c: ditto * vm_insnhelper.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 7fb18714dd..ef4c938fc5 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -3211,7 +3211,7 @@ vm_opt_newarray_max(rb_num_t num, const VALUE *ptr) else { struct cmp_opt_data cmp_opt = { 0, 0 }; VALUE result = *ptr; - rb_num_t i = num - 1; + rb_snum_t i = num - 1; while (i-- > 0) { const VALUE v = *++ptr; if (OPTIMIZED_CMP(v, result, cmp_opt) > 0) { @@ -3237,7 +3237,7 @@ vm_opt_newarray_min(rb_num_t num, const VALUE *ptr) else { struct cmp_opt_data cmp_opt = { 0, 0 }; VALUE result = *ptr; - rb_num_t i = num - 1; + rb_snum_t i = num - 1; while (i-- > 0) { const VALUE v = *++ptr; if (OPTIMIZED_CMP(v, result, cmp_opt) < 0) { -- cgit v1.2.3