From 06e247a4017f1053854f846b53ec493c7f86944f Mon Sep 17 00:00:00 2001 From: Ali Mashtizadeh Date: Tue, 22 Aug 2023 21:53:26 -0400 Subject: [PATCH] Add NO_RETURN to abort and assert functions. --- include/stdlib.h | 2 +- sys/include/kassert.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index a5fe2ad..d8b9f8f 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -10,7 +10,7 @@ int atexit(void (*function)(void)); void exit(int status); -void abort(void); +_Noreturn void abort(void); void *calloc(size_t num, size_t sz); void *malloc(size_t sz); diff --git a/sys/include/kassert.h b/sys/include/kassert.h index b34d9a2..894a9d9 100644 --- a/sys/include/kassert.h +++ b/sys/include/kassert.h @@ -20,7 +20,7 @@ NO_RETURN void Panic(const char *str); int kprintf(const char *fmt, ...); -void Debug_Assert(const char *fmt, ...); +NO_RETURN void Debug_Assert(const char *fmt, ...); #define static_assert _Static_assert