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

[win32] suppress false warning by MSVC

This commit is contained in:
Nobuyoshi Nakada 2020-03-04 21:02:24 +09:00
parent 502d9bcd36
commit 364526cd70
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -428,7 +428,8 @@ free_unit(struct rb_mjit_unit *unit)
unit->iseq->body->jit_unit = NULL; unit->iseq->body->jit_unit = NULL;
} }
if (unit->cc_entries) { if (unit->cc_entries) {
free(unit->cc_entries); void *entries = (void *)unit->cc_entries;
free(entries);
} }
if (unit->handle && dlclose(unit->handle)) { // handle is NULL if it's in queue if (unit->handle && dlclose(unit->handle)) { // handle is NULL if it's in queue
mjit_warning("failed to close handle for u%d: %s", unit->id, dlerror()); mjit_warning("failed to close handle for u%d: %s", unit->id, dlerror());