From: divverent Date: Thu, 19 Apr 2012 19:48:29 +0000 (+0000) Subject: mark Host_Error as noreturn to help static analysis X-Git-Tag: xonotic-v0.8.0~96^2~237 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=d6e858c397781fea72db705461b0a349bfc388be mark Host_Error as noreturn to help static analysis git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11801 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/quakedef.h b/quakedef.h index de92736c..fd0f253e 100644 --- a/quakedef.h +++ b/quakedef.h @@ -25,9 +25,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #if defined(__GNUC__) && (__GNUC__ > 2) #define DP_FUNC_PRINTF(n) __attribute__ ((format (printf, n, n+1))) #define DP_FUNC_PURE __attribute__ ((pure)) +#define DP_FUNC_NORETURN __attribute__ ((noreturn)) #else #define DP_FUNC_PRINTF(n) #define DP_FUNC_PURE +#define DP_FUNC_NORETURN #endif #include @@ -508,7 +510,7 @@ void Host_InitCommands(void); void Host_Main(void); void Host_Shutdown(void); void Host_StartVideo(void); -void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1); +void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN; void Host_Quit_f(void); void Host_ClientCommands(const char *fmt, ...) DP_FUNC_PRINTF(1); void Host_ShutdownServer(void); diff --git a/sys.h b/sys.h index 628c5d61..e5247d35 100644 --- a/sys.h +++ b/sys.h @@ -68,7 +68,7 @@ char *Sys_TimeString(const char *timeformat); // /// an error will cause the entire program to exit -void Sys_Error (const char *error, ...) DP_FUNC_PRINTF(1); +void Sys_Error (const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN; /// (may) output text to terminal which launched program void Sys_PrintToTerminal(const char *text);