From b34ba7b4f0d7e80dc84b3f3ae866e6da97fe9cc5 Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Wed, 25 Feb 2026 21:27:02 +0100 Subject: [PATCH] Mark OSPanic and OSFatal as [[noreturn]] Enables them to avoid "method isn't returning a value" errors --- include/dolphin/os.h | 4 ++-- include/dolphin/types.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/dolphin/os.h b/include/dolphin/os.h index f3e6326ec6..ef23b716ff 100644 --- a/include/dolphin/os.h +++ b/include/dolphin/os.h @@ -209,8 +209,8 @@ void OSSetSoundMode(u32 mode); DECL_WEAK void OSReport(const char* msg, ...); DECL_WEAK void OSVReport(const char* msg, va_list list); -DECL_WEAK void OSPanic(const char* file, int line, const char* msg, ...); -void OSFatal(GXColor fg, GXColor bg, const char* msg); +DECL_WEAK void OSPanic NORETURN(const char* file, int line, const char* msg, ...); +void OSFatal NORETURN(GXColor fg, GXColor bg, const char* msg); // do these belong here? DECL_WEAK void OSAttention(const char* msg, ...); diff --git a/include/dolphin/types.h b/include/dolphin/types.h index e8c3df7861..5044dabbb5 100644 --- a/include/dolphin/types.h +++ b/include/dolphin/types.h @@ -106,5 +106,11 @@ typedef unsigned int uint; #include #endif +#if TARGET_PC && __cplusplus +#define NORETURN [[noreturn]] +#else +#define NORETURN +#endif + #endif #endif