mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_insnhelper.c: suppress a warning
* vm_insnhelper.c (vm_setivar): cast to long both side of a conditional expression to suppress a sign-compare warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
46b39cb0ba
commit
288f6e1b89
1 changed files with 1 additions and 1 deletions
|
@ -765,7 +765,7 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic, rb_call_info_t *ci, int is_attr)
|
|||
if (LIKELY(
|
||||
(!is_attr && ic->ic_serial == RCLASS_SERIAL(klass)) ||
|
||||
(is_attr && ci->aux.index > 0))) {
|
||||
long index = !is_attr ? (long)ic->ic_value.index : ci->aux.index-1;
|
||||
long index = !is_attr ? (long)ic->ic_value.index : (long)ci->aux.index-1;
|
||||
long len = ROBJECT_NUMIV(obj);
|
||||
VALUE *ptr = ROBJECT_IVPTR(obj);
|
||||
|
||||
|
|
Loading…
Reference in a new issue