2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-12-22 08:52:32 +01:00

engine: mark some functions as never returning nullptr

This commit is contained in:
Alibek Omarov 2024-11-07 16:11:58 +03:00
parent b51d1a4e2e
commit 16ed6cbdcb
6 changed files with 16 additions and 16 deletions

View File

@ -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 )

View File

@ -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 );

View File

@ -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

View File

@ -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 );

View File

@ -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;

View File

@ -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 );