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

Remove the unused o_file definition

It's calculated inside compile_c_to_so again.
This commit is contained in:
Takashi Kokubun 2020-11-21 00:29:51 -08:00
parent 8750d001c2
commit a6db9e8d7b
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -1084,10 +1084,6 @@ convert_unit_to_func(struct rb_mjit_unit *unit)
int c_file_len = (int)sizeof(c_file_buff);
static const char c_ext[] = ".c";
static const char so_ext[] = DLEXT;
#ifndef _MSC_VER
static const char o_ext[] = ".o";
char *o_file;
#endif
c_file_len = sprint_uniq_filename(c_file_buff, c_file_len, unit->id, MJIT_TMP_PREFIX, c_ext);
if (c_file_len >= (int)sizeof(c_file_buff)) {
@ -1097,11 +1093,6 @@ convert_unit_to_func(struct rb_mjit_unit *unit)
}
++c_file_len;
#ifndef _MSC_VER
o_file = alloca(c_file_len - sizeof(c_ext) + sizeof(o_ext));
memcpy(o_file, c_file, c_file_len - sizeof(c_ext));
memcpy(&o_file[c_file_len - sizeof(c_ext)], o_ext, sizeof(o_ext));
#endif
so_file = alloca(c_file_len - sizeof(c_ext) + sizeof(so_ext));
memcpy(so_file, c_file, c_file_len - sizeof(c_ext));
memcpy(&so_file[c_file_len - sizeof(c_ext)], so_ext, sizeof(so_ext));