diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-10 00:33:11 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-10 00:33:11 +0000 |
commit | 1f77f84799e45fcb48f41d7637d3858feb510849 (patch) | |
tree | 3ab20fe35f9af1a82f4fe785a35e6f4c3f3c153f | |
parent | 96962c62a153e135632fe694b00e092c61cfe227 (diff) | |
download | ruby-1f77f84799e45fcb48f41d7637d3858feb510849.tar.gz |
Fix error: implicit conversion loses integer precision
http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/627906
```
iseq.h:41:36: error: implicit conversion loses integer precision: 'rb_num_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
int cnt = iseq->body->variable.flip_count;
~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | compile.c | 2 | ||||
-rw-r--r-- | iseq.h | 4 | ||||
-rw-r--r-- | vm_core.h | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -8751,7 +8751,7 @@ ibf_load_iseq_each(const struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t of ISEQ_COVERAGE_SET(iseq, Qnil); ISEQ_ORIGINAL_ISEQ_CLEAR(iseq); - iseq->body->variable.flip_count = (int)body->variable.flip_count; + iseq->body->variable.flip_count = body->variable.flip_count; { VALUE realpath = Qnil, path = ibf_load_object(load, body->location.pathobj); @@ -35,10 +35,10 @@ rb_call_info_kw_arg_bytes(int keyword_len) #define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count -static inline int +static inline rb_snum_t ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq) { - int cnt = iseq->body->variable.flip_count; + rb_snum_t cnt = iseq->body->variable.flip_count; iseq->body->variable.flip_count += 1; return cnt; } @@ -412,7 +412,7 @@ struct rb_iseq_constant_body { struct rb_call_cache *cc_entries; /* size is ci_size = ci_kw_size */ struct { - rb_num_t flip_count; + rb_snum_t flip_count; VALUE coverage; VALUE original_iseq; } variable; |