diff --git a/engine/common/common.h b/engine/common/common.h index b6d2e4da..065284e7 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -424,8 +424,8 @@ void Cbuf_ExecStuffCmds( void ); void Cbuf_Execute (void); qboolean Cmd_CurrentCommandIsPrivileged( void ); int Cmd_Argc( void ); -const char *Cmd_Args( void ); -const char *Cmd_Argv( int arg ); +const char *Cmd_Args( void ) RETURNS_NONNULL; +const char *Cmd_Argv( int arg ) RETURNS_NONNULL; void Cmd_Init( void ); void Cmd_Unlink( int group ); void Cmd_AddCommand( const char *cmd_name, xcommand_t function, const char *cmd_desc ); @@ -774,7 +774,7 @@ qboolean COM_ParseVector( char **pfile, float *v, size_t size ); int COM_FileSize( const char *filename ); void COM_FreeFile( void *buffer ); int COM_CompareFileTime( const char *filename1, const char *filename2, int *iCompare ); -char *va( const char *format, ... ) FORMAT_CHECK( 1 ); +char *va( const char *format, ... ) FORMAT_CHECK( 1 ) RETURNS_NONNULL; qboolean CRC32_MapFile( dword *crcvalue, const char *filename, qboolean multiplayer ); static inline void COM_NormalizeAngles( vec3_t angles ) diff --git a/engine/common/cvar.h b/engine/common/cvar.h index f3920962..fd72cd6d 100644 --- a/engine/common/cvar.h +++ b/engine/common/cvar.h @@ -42,10 +42,10 @@ void Cvar_DirectSet( convar_t *var, const char *value ); void Cvar_DirectSetValue( convar_t *var, float value ); void Cvar_Set( const char *var_name, const char *value ); void Cvar_SetValue( const char *var_name, float value ); -const char *Cvar_BuildAutoDescription( const char *szName, int flags ); +const char *Cvar_BuildAutoDescription( const char *szName, int flags ) RETURNS_NONNULL; float Cvar_VariableValue( const char *var_name ); int Cvar_VariableInteger( const char *var_name ); -const char *Cvar_VariableString( const char *var_name ); +const char *Cvar_VariableString( const char *var_name ) RETURNS_NONNULL; void Cvar_WriteVariables( file_t *f, int group ); qboolean Cvar_Exists( const char *var_name ); void Cvar_Reset( const char *var_name ); diff --git a/engine/common/net_buffer.h b/engine/common/net_buffer.h index 87a03681..6098022a 100644 --- a/engine/common/net_buffer.h +++ b/engine/common/net_buffer.h @@ -256,8 +256,8 @@ float MSG_ReadCoord( sizebuf_t *sb ); float MSG_ReadFloat( sizebuf_t *sb ); void MSG_ReadVec3Coord( sizebuf_t *sb, vec3_t fa ); void MSG_ReadVec3Angles( sizebuf_t *sb, vec3_t fa ); -char *MSG_ReadString( sizebuf_t *sb ); -char *MSG_ReadStringLine( sizebuf_t *sb ); +char *MSG_ReadString( sizebuf_t *sb ) RETURNS_NONNULL; +char *MSG_ReadStringLine( sizebuf_t *sb ) RETURNS_NONNULL; qboolean MSG_ReadBytes( sizebuf_t *sb, void *pOut, int nBytes ); #endif//NET_BUFFER_H diff --git a/engine/common/net_ws.h b/engine/common/net_ws.h index 2ced5452..4825c712 100644 --- a/engine/common/net_ws.h +++ b/engine/common/net_ws.h @@ -61,8 +61,8 @@ void NET_Sleep( int msec ); qboolean NET_IsActive( void ); qboolean NET_IsConfigured( void ); void NET_Config( qboolean net_enable, qboolean changeport ); -const char *NET_AdrToString( const netadr_t a ); -const char *NET_BaseAdrToString( const netadr_t a ); +const char *NET_AdrToString( const netadr_t a ) RETURNS_NONNULL; +const char *NET_BaseAdrToString( const netadr_t a ) RETURNS_NONNULL; qboolean NET_IsReservedAdr( netadr_t a ); qboolean NET_CompareClassBAdr( const netadr_t a, const netadr_t b ); qboolean NET_StringToAdr( const char *string, netadr_t *adr ); diff --git a/engine/menu_int.h b/engine/menu_int.h index ebc4bd69..abeeb020 100644 --- a/engine/menu_int.h +++ b/engine/menu_int.h @@ -76,7 +76,7 @@ typedef struct ui_enginefuncs_s // cvar handlers cvar_t* (*pfnRegisterVariable)( const char *szName, const char *szValue, int flags ); float (*pfnGetCvarFloat)( const char *szName ); - const char* (*pfnGetCvarString)( const char *szName ); + const char* (*pfnGetCvarString)( const char *szName ) PFN_RETURNS_NONNULL; void (*pfnCvarSetString)( const char *szName, const char *szValue ); void (*pfnCvarSetValue)( const char *szName, float flValue ); @@ -85,8 +85,8 @@ typedef struct ui_enginefuncs_s void (*pfnClientCmd)( int execute_now, const char *szCmdString ); void (*pfnDelCommand)( const char *cmd_name ); int (*pfnCmdArgc)( void ); - const char* (*pfnCmdArgv)( int argc ); - const char* (*pfnCmd_Args)( void ); + const char* (*pfnCmdArgv)( int argc ) PFN_RETURNS_NONNULL; + const char* (*pfnCmd_Args)( void ) PFN_RETURNS_NONNULL; // debug messages (in-menu shows only notify) void (*Con_Printf)( const char *fmt, ... ) FORMAT_CHECK( 1 ); @@ -214,7 +214,7 @@ typedef struct ui_extendedfuncs_s { char *(*pfnParseFile)( char *data, char *buf, const int size, unsigned int flags, int *len ); // network address funcs - const char *(*pfnAdrToString)( const struct netadr_s a ); + const char *(*pfnAdrToString)( const struct netadr_s a ) PFN_RETURNS_NONNULL; int (*pfnCompareAdr)( const void *a, const void *b ); // netadr_t void *(*pfnGetNativeObject)( const char *name ); struct net_api_s *pNetAPI; diff --git a/engine/ref_api.h b/engine/ref_api.h index c9979992..b68a2370 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -319,7 +319,7 @@ typedef struct ref_api_s cvar_t *(*Cvar_Get)( const char *szName, const char *szValue, int flags, const char *description ); cvar_t *(*pfnGetCvarPointer)( const char *name, int ignore_flags ); float (*pfnGetCvarFloat)( const char *szName ); - const char *(*pfnGetCvarString)( const char *szName ); + const char *(*pfnGetCvarString)( const char *szName ) PFN_RETURNS_NONNULL; void (*Cvar_SetValue)( const char *name, float value ); void (*Cvar_Set)( const char *name, const char *value ); void (*Cvar_RegisterVariable)( convar_t *var ); @@ -329,8 +329,8 @@ typedef struct ref_api_s int (*Cmd_AddCommand)( const char *cmd_name, void (*function)(void), const char *description ); void (*Cmd_RemoveCommand)( const char *cmd_name ); int (*Cmd_Argc)( void ); - const char *(*Cmd_Argv)( int arg ); - const char *(*Cmd_Args)( void ); + const char *(*Cmd_Argv)( int arg ) PFN_RETURNS_NONNULL; + const char *(*Cmd_Args)( void ) PFN_RETURNS_NONNULL; // cbuf void (*Cbuf_AddText)( const char *commands );