From 8b458e545765687c60fc810d3e261d48a378e21c Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 9 May 2016 10:41:58 -0500 Subject: [PATCH] Fix warnings that names passed to Name_PlayerNameCompletion is not const --- code/client/cl_main.c | 2 +- code/qcommon/common.c | 2 +- code/qcommon/qcommon.h | 2 +- code/server/sv_ccmds.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 205fd63c..5ede69dd 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -1806,7 +1806,7 @@ static void CL_CompletePlayerName( char *args, int argNum ) if( argNum == 2 ) { char names[MAX_CLIENTS][MAX_NAME_LENGTH]; - char *namesPtr[MAX_CLIENTS]; + const char *namesPtr[MAX_CLIENTS]; int i; int clientCount; int nameCount; diff --git a/code/qcommon/common.c b/code/qcommon/common.c index aa62724b..c3c595b5 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -3699,7 +3699,7 @@ qboolean Com_PlayerNameToFieldString( char *str, int length, const char *name ) return qtrue; } -void Field_CompletePlayerName( char **names, int nameCount ) +void Field_CompletePlayerName( const char **names, int nameCount ) { qboolean whitespace; diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index b47a41f4..70f1e6c1 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -762,7 +762,7 @@ void Field_CompleteFilename( const char *dir, const char *ext, qboolean stripExt, qboolean allowNonPureFilesOnDisk ); void Field_CompleteCommand( char *cmd, qboolean doCommands, qboolean doCvars ); -void Field_CompletePlayerName( char **names, int count ); +void Field_CompletePlayerName( const char **names, int count ); /* ============================================================== diff --git a/code/server/sv_ccmds.c b/code/server/sv_ccmds.c index 506afcca..5f26b853 100644 --- a/code/server/sv_ccmds.c +++ b/code/server/sv_ccmds.c @@ -1480,7 +1480,7 @@ SV_CompletePlayerName static void SV_CompletePlayerName( char *args, int argNum ) { if( argNum == 2 ) { char names[MAX_CLIENTS][MAX_NAME_LENGTH]; - char *namesPtr[MAX_CLIENTS]; + const char *namesPtr[MAX_CLIENTS]; client_t *cl; int i; int nameCount;