From f25254369d3a47582430fa33ba8b78c5836eeffc Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 28 May 2022 17:58:17 +0300 Subject: [PATCH] engine: set useful format attribute for RefAPI, set Host_Error as NORETURN --- engine/ref_api.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/ref_api.h b/engine/ref_api.h index bfe210a6..3c3119d3 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -277,13 +277,13 @@ typedef struct ref_api_s void (*Cbuf_Execute)( void ); // logging - void (*Con_Printf)( const char *fmt, ... ); // typical console allowed messages - void (*Con_DPrintf)( const char *fmt, ... ); // -dev 1 - void (*Con_Reportf)( const char *fmt, ... ); // -dev 2 + void (*Con_Printf)( const char *fmt, ... ) _format( 1 ); // typical console allowed messages + void (*Con_DPrintf)( const char *fmt, ... ) _format( 1 ); // -dev 1 + void (*Con_Reportf)( const char *fmt, ... ) _format( 1 ); // -dev 2 // debug print - void (*Con_NPrintf)( int pos, const char *fmt, ... ); - void (*Con_NXPrintf)( struct con_nprint_s *info, const char *fmt, ... ); + void (*Con_NPrintf)( int pos, const char *fmt, ... ) _format( 2 ); + void (*Con_NXPrintf)( struct con_nprint_s *info, const char *fmt, ... ) _format( 2 ); void (*CL_CenterPrint)( const char *s, float y ); void (*Con_DrawStringLen)( const char *pText, int *length, int *height ); int (*Con_DrawString)( int x, int y, const char *string, rgba_t setColor ); @@ -335,7 +335,7 @@ typedef struct ref_api_s // utils void (*CL_ExtraUpdate)( void ); - void (*Host_Error)( const char *fmt, ... ); + void (*Host_Error)( const char *fmt, ... ) _format( 1 ) NORETURN; void (*COM_SetRandomSeed)( int lSeed ); float (*COM_RandomFloat)( float rmin, float rmax ); int (*COM_RandomLong)( int rmin, int rmax );