mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Simplify variable declaration by C99
This commit is contained in:
parent
103b04128f
commit
de74d2c3b0
1 changed files with 6 additions and 8 deletions
14
mjit.c
14
mjit.c
|
@ -768,14 +768,12 @@ mjit_init(const struct mjit_options *opts)
|
|||
cc_added_args = split_flags(opts->debug_flags);
|
||||
xfree(opts->debug_flags);
|
||||
#if MJIT_CFLAGS_PIPE
|
||||
{ // eliminate a flag incompatible with `-pipe`
|
||||
size_t i, j;
|
||||
for (i = 0, j = 0; i < sizeof(CC_COMMON_ARGS) / sizeof(char *); i++) {
|
||||
if (CC_COMMON_ARGS[i] && strncmp("-save-temps", CC_COMMON_ARGS[i], strlen("-save-temps")) == 0)
|
||||
continue; // skip -save-temps flag
|
||||
cc_common_args[j] = CC_COMMON_ARGS[i];
|
||||
j++;
|
||||
}
|
||||
// eliminate a flag incompatible with `-pipe`
|
||||
for (size_t i = 0, j = 0; i < sizeof(CC_COMMON_ARGS) / sizeof(char *); i++) {
|
||||
if (CC_COMMON_ARGS[i] && strncmp("-save-temps", CC_COMMON_ARGS[i], strlen("-save-temps")) == 0)
|
||||
continue; // skip -save-temps flag
|
||||
cc_common_args[j] = CC_COMMON_ARGS[i];
|
||||
j++;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue