Fix some warnings.

This commit is contained in:
Night Owl 2017-11-21 00:23:09 +05:00
parent 461206e94b
commit b2558c749d
4 changed files with 15 additions and 15 deletions

View File

@ -64,12 +64,12 @@ BOOL skin_used[MAX_SKINS] = {
FALSE, FALSE, FALSE, FALSE, FALSE};
// store the names of the models...
char *bot_skins[MAX_SKINS] = {
const char *bot_skins[MAX_SKINS] = {
"barney", "gina", "gman", "gordon", "helmet",
"hgrunt", "recon", "robo", "scientist", "zombie"};
// store the player names for each of the models...
char *bot_names[MAX_SKINS] = {
const char *bot_names[MAX_SKINS] = {
"Barney", "Gina", "G-Man", "Gordon", "Helmet",
"H-Grunt", "Recon", "Robo", "Scientist", "Zombie"};
@ -101,13 +101,13 @@ inline char *GET_INFOBUFFER( edict_t *e )
return (*g_engfuncs.pfnGetInfoKeyBuffer)( e );
}
inline char *GET_INFO_KEY_VALUE( char *infobuffer, char *key )
inline char *GET_INFO_KEY_VALUE( const char *infobuffer, const char *key )
{
return (g_engfuncs.pfnInfoKeyValue( infobuffer, key ));
}
inline void SET_CLIENT_KEY_VALUE( int clientIndex, char *infobuffer,
char *key, char *value )
inline void SET_CLIENT_KEY_VALUE( int clientIndex, const char *infobuffer,
const char *key, const char *value )
{
(*g_engfuncs.pfnSetClientKeyValue)( clientIndex, infobuffer, key, value );
}
@ -221,7 +221,7 @@ void BotCreate(const char *skin, const char *name, const char *skill)
sprintf( err_msg, "model \"%s\" is unknown.\n", c_skin );
UTIL_ClientPrintAll( HUD_PRINTNOTIFY, err_msg );
if (IS_DEDICATED_SERVER())
printf(err_msg);
printf( "%s\n", err_msg );
UTIL_ClientPrintAll( HUD_PRINTNOTIFY,
"use barney, gina, gman, gordon, helmet, hgrunt,\n");

View File

@ -26,8 +26,8 @@
typedef struct // used in checking if bot can pick up ammo
{
char *ammo_name;
char *weapon_name;
const char *ammo_name;
const char *weapon_name;
int max_carry;
} ammo_check_t;

View File

@ -1205,7 +1205,7 @@ void StartFrame( void )
if( IS_DEDICATED_SERVER() )
{
sprintf( msg, "min_bots set to %d\n", min_bots );
printf( msg );
printf( "%s\n", msg );
}
}
else if( strcmp( cmd, "max_bots" ) == 0 )
@ -1218,7 +1218,7 @@ void StartFrame( void )
if( IS_DEDICATED_SERVER() )
{
sprintf( msg, "max_bots set to %d\n", max_bots );
printf( msg );
printf( "%s\n", msg );
}
}
else if( strcmp( cmd, "pause" ) == 0 )
@ -1232,7 +1232,7 @@ void StartFrame( void )
ALERT( at_console, msg );
if( IS_DEDICATED_SERVER() )
printf( msg );
printf( "%s\n", msg );
SERVER_COMMAND( server_cmd );
}
@ -1250,7 +1250,7 @@ void StartFrame( void )
{
check_server_cmd = gpGlobals->time + 1.0;
char *cvar_bot = (char *)CVAR_GET_STRING( "bot" );
const char *cvar_bot = CVAR_GET_STRING( "bot" );
if( cvar_bot && cvar_bot[0] )
{

View File

@ -201,9 +201,9 @@ typedef struct enginefuncs_s
void (*pfnRunPlayerMove)( edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec );
int (*pfnNumberOfEntities)( void );
char* (*pfnGetInfoKeyBuffer)( edict_t *e ); // passing in NULL gets the serverinfo
char* (*pfnInfoKeyValue)( char *infobuffer, const char *key );
void (*pfnSetKeyValue)( char *infobuffer, const char *key, const char *value );
void (*pfnSetClientKeyValue)( int clientIndex, char *infobuffer, const char *key, const char *value );
char* (*pfnInfoKeyValue)( const char *infobuffer, const char *key );
void (*pfnSetKeyValue)( const char *infobuffer, const char *key, const char *value );
void (*pfnSetClientKeyValue)( int clientIndex, const char *infobuffer, const char *key, const char *value );
int (*pfnIsMapValid)( const char *filename );
void (*pfnStaticDecal)( const float *origin, int decalIndex, int entityIndex, int modelIndex );
int (*pfnPrecacheGeneric)( const char *s );