mark abort() function as noreturn.
It was not specified as such before C11, but that's only because there was no C standard way to do it until then. Fixes #15955. Change-Id: Ied7b7fd94988ed7724460917aebc859b74eaa585 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2558 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
3268566c20
commit
d0e1eb7a7b
@@ -52,7 +52,7 @@ extern int posix_memalign(void **_pointer, size_t alignment, size_t size);
|
||||
extern void *realloc(void *oldPointer, size_t newSize);
|
||||
|
||||
/* process termination */
|
||||
extern void abort(void);
|
||||
extern void abort(void) __attribute__((noreturn));
|
||||
extern int atexit(void (*func)(void));
|
||||
extern int atfork(void (*func)(void));
|
||||
extern void exit(int) __attribute__((noreturn));
|
||||
|
||||
@@ -381,7 +381,8 @@ extern "C"
|
||||
void
|
||||
abort()
|
||||
{
|
||||
panic("abort() called!");
|
||||
while (true)
|
||||
panic("abort() called!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user