mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-24 21:38:39 -04:00
turn I_Error() into an actual NORETURN function
This commit is contained in:
parent
d68862a79f
commit
05aa665373
@ -349,6 +349,15 @@ void I_Error(const char *error, ...) // killough 3/20/98: add const
|
||||
{
|
||||
boolean exit_gui_popup;
|
||||
|
||||
if (has_exited) // If it hasn't exited yet, exit now -- killough
|
||||
{
|
||||
exit(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
has_exited=1; // Prevent infinitely recursive exits -- killough
|
||||
}
|
||||
|
||||
if(!*errmsg) // ignore all but the first message -- killough
|
||||
{
|
||||
va_list argptr;
|
||||
@ -370,11 +379,7 @@ void I_Error(const char *error, ...) // killough 3/20/98: add const
|
||||
PROJECT_STRING, errmsg, NULL);
|
||||
}
|
||||
|
||||
if(!has_exited) // If it hasn't exited yet, exit now -- killough
|
||||
{
|
||||
has_exited=1; // Prevent infinitely recursive exits -- killough
|
||||
exit(-1);
|
||||
}
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// killough 2/22/98: Add support for ENDBOOM, which is PC-specific
|
||||
|
@ -90,7 +90,7 @@ void I_Quit (void);
|
||||
|
||||
// killough 3/20/98: add const
|
||||
// killough 4/25/98: add gcc attributes
|
||||
void I_Error(const char *error, ...) PRINTF_ATTR(1, 2);
|
||||
void I_Error(const char *error, ...) NORETURN PRINTF_ATTR(1, 2);
|
||||
|
||||
extern int leds_always_off; // killough 10/98
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user