From d1907666fbec410970a022685dd3f7291a52cb6b Mon Sep 17 00:00:00 2001 From: Molgrum Date: Sat, 18 Aug 2007 02:46:10 +0000 Subject: [PATCH] Moved declaration of COM_FileSize to common.h to fix warnings. Fixed one GCC warning in pr_cmds.c, added one ifdef in gl_alias.c git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2594 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/pr_csqc.c | 1 - engine/client/pr_menu.c | 1 - engine/common/common.h | 1 + engine/common/log.c | 1 - engine/gl/gl_alias.c | 2 ++ engine/server/pr_cmds.c | 4 +--- 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c index 6e22325d1..922a15c79 100644 --- a/engine/client/pr_csqc.c +++ b/engine/client/pr_csqc.c @@ -3452,7 +3452,6 @@ static progparms_t csqcprogparms; -int COM_FileSize(char *path); pbool QC_WriteFile(char *name, void *data, int len); void *VARGS PR_CB_Malloc(int size); //these functions should be tracked by the library reliably, so there should be no need to track them ourselves. void VARGS PR_CB_Free(void *mem); diff --git a/engine/client/pr_menu.c b/engine/client/pr_menu.c index 334ccc9ba..dfbffb09e 100644 --- a/engine/client/pr_menu.c +++ b/engine/client/pr_menu.c @@ -1372,7 +1372,6 @@ void MP_Shutdown (void) } } -int COM_FileSize(char *path); pbool QC_WriteFile(char *name, void *data, int len); void *VARGS PR_CB_Malloc(int size); //these functions should be tracked by the library reliably, so there should be no need to track them ourselves. void VARGS PR_CB_Free(void *mem); diff --git a/engine/common/common.h b/engine/common/common.h index 1fcec34af..09cdad07c 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -255,6 +255,7 @@ void COM_ParsePlusSets (void); char *COM_SkipPath (char *pathname); void COM_StripExtension (char *in, char *out, int outlen); void COM_FileBase (char *in, char *out, int outlen); +int COM_FileSize(char *path); void COM_DefaultExtension (char *path, char *extension, int maxlen); void COM_DeFunString(unsigned long *str, char *out, int outsize, qboolean ignoreflags); void COM_ParseFunString(char *str, unsigned long *out, int outsize); diff --git a/engine/common/log.c b/engine/common/log.c index 3623a54f8..25414f919 100644 --- a/engine/common/log.c +++ b/engine/common/log.c @@ -20,7 +20,6 @@ cvar_t log_rotate_size = SCVARF("log_rotate_size", "131072", CVAR_NOTFROMSERVER cvar_t log_dosformat = SCVARF("log_dosformat", "0", CVAR_NOTFROMSERVER); // externals -int COM_FileSize(char *path); extern char gamedirfile[]; // table of readable characters, same as ezquake diff --git a/engine/gl/gl_alias.c b/engine/gl/gl_alias.c index 7f8675366..89771a9ab 100644 --- a/engine/gl/gl_alias.c +++ b/engine/gl/gl_alias.c @@ -29,7 +29,9 @@ #define MAX_BONES 256 +#ifndef SERVERONLY static model_t *loadmodel; +#endif //FIXME typedef struct diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index 4ed7fd102..0eac8ebda 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -140,8 +140,6 @@ char *QC_ProgsNameForEnt(edict_t *ent) int pr_edict_size; -int COM_FileSize(char *path); - pbool QC_WriteFile(char *name, void *data, int len) { char buffer[256]; @@ -9268,7 +9266,7 @@ void PF_matchclient(progfuncs_t *prinst, struct globalvars_s *pr_globals) else G_INT(OFS_RETURN) = (cl - svs.clients) + 1; - if (cl = SV_GetClientForString(name, &clnum)) + if ((cl = SV_GetClientForString(name, &clnum))) G_INT(OFS_RETURN) = 0; //prevent multiple matches. return; }