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

Mark ruby_memerror as NORETURN

This commit is contained in:
Nobuyoshi Nakada 2020-04-29 00:27:50 +09:00
parent 1994ed90e4
commit ac0c760843
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

3
gc.c
View file

@ -9596,6 +9596,7 @@ ruby_memerror_body(void *dummy)
return 0;
}
NORETURN(static void ruby_memerror(void));
RUBY3_ATTR_MAYBE_UNUSED()
static void
ruby_memerror(void)
@ -9610,9 +9611,9 @@ ruby_memerror(void)
else {
/* no ruby thread */
fprintf(stderr, "[FATAL] failed to allocate memory\n");
exit(EXIT_FAILURE);
}
}
exit(EXIT_FAILURE);
}
void