diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_local.h | 4 | ||||
-rw-r--r-- | src/cgame/cg_syscalls.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 148f3328..cf1da82d 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1542,7 +1542,7 @@ const char *CG_ConfigString( int index ); const char *CG_Argv( int arg ); void QDECL CG_Printf( const char *msg, ... ) __attribute__ ((format (printf, 1, 2))); -void QDECL CG_Error( const char *msg, ... ) __attribute__ ((format (printf, 1, 2))); +void QDECL CG_Error( const char *msg, ... ) __attribute__ ((noreturn, format (printf, 1, 2))); void CG_StartMusic( void ); int CG_PlayerCount( void ); @@ -1863,7 +1863,7 @@ const char *CG_TutorialText( void ); void trap_Print( const char *fmt ); // abort the game -void trap_Error( const char *fmt ); +void trap_Error( const char *fmt ) __attribute__((noreturn)); // milliseconds should only be used for performance tuning, never // for anything game related. Get time from the CG_DrawActiveFrame parameter diff --git a/src/cgame/cg_syscalls.c b/src/cgame/cg_syscalls.c index e3c53411..4765751d 100644 --- a/src/cgame/cg_syscalls.c +++ b/src/cgame/cg_syscalls.c @@ -51,6 +51,8 @@ void trap_Print( const char *fmt ) void trap_Error( const char *fmt ) { syscall( CG_ERROR, fmt ); + // shut up GCC warning about returning functions, because we know better + exit(1); } int trap_Milliseconds( void ) |