From b3afad67ff75dc7bd22b31b8370bbabd9786bbdd Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 10 Apr 2012 10:55:26 +0100 Subject: [PATCH] Use noreturn attribute in Exit() declaration. Use the gcc-specific noreturn attribute to advise the compiler that Exit() doesn't return. This is safe because we already use preprocessor rules to hide __attribute__ from other compilers. Suggested independently by Christophe Curis and Brad Jorsch. --- src/funcs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/funcs.h b/src/funcs.h index ce9a99dc..f64a40ff 100644 --- a/src/funcs.h +++ b/src/funcs.h @@ -35,7 +35,7 @@ void Shutdown(WShutdownMode mode); void RestoreDesktop(WScreen *scr); -void Exit(int status); +void Exit(int status) __attribute__((noreturn)); void Restart(char *manager, Bool abortOnFailure);