1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Get rid of bogus warning by VC

```
c:\projects\ruby\mjit_worker.c(1219) : warning C4090: 'function' : different 'const' qualifiers
```

It seems confused by passing "pointer to pointer to const object",
not "pointer to const object".
This commit is contained in:
Nobuyoshi Nakada 2020-03-17 19:47:45 +09:00
parent 165e457236
commit 3325194ac0
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -1216,7 +1216,8 @@ mjit_capture_cc_entries(const struct rb_iseq_constant_body *compiled_iseq, const
if (cc_entries == NULL) return -1;
}
else {
cc_entries = realloc(unit->cc_entries, sizeof(struct rb_callcache *) * new_entries_size);
void *cc_ptr = (void *)unit->cc_entries; // get rid of bogus warning by VC
cc_entries = realloc(cc_ptr, sizeof(struct rb_callcache *) * new_entries_size);
if (cc_entries == NULL) return -1;
unit->cc_entries = cc_entries;
cc_entries += cc_entries_index;