From: divverent Date: Tue, 7 Jan 2014 16:29:21 +0000 (+0000) Subject: Fix some warnings. X-Git-Tag: xonotic-v0.8.1~29^2~117 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b314e889bc28c04da19258529b3215f37baa6629;p=xonotic%2Fdarkplaces.git Fix some warnings. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12041 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index 4b6100f8..f476d3c0 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -694,7 +694,9 @@ static void SCR_SetUpToDrawConsole (void) { // lines of console to display float conlines; +#ifdef CONFIG_MENU static int framecounter = 0; +#endif Con_CheckResize (); @@ -707,8 +709,8 @@ static void SCR_SetUpToDrawConsole (void) framecounter++; } else -#endif framecounter = 0; +#endif if (scr_conforcewhiledisconnected.integer && key_dest == key_game && cls.signon != SIGNONS) key_consoleactive |= KEY_CONSOLEACTIVE_FORCED; diff --git a/host_cmd.c b/host_cmd.c index 733704aa..c9cf39c2 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "sv_demo.h" #include "image.h" +#include "prvm_cmds.h" #include "utf8lib.h" // for secure rcon authentication @@ -761,11 +762,6 @@ Host_Loadgame_f =============== */ -prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, char *format); -void BufStr_Set(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer, int strindex, const char *str); -void BufStr_Del(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer); -void BufStr_Flush(prvm_prog_t *prog); - static void Host_Loadgame_f (void) { prvm_prog_t *prog = SVVM_prog; diff --git a/protocol.c b/protocol.c index 6a4e435e..85db0877 100644 --- a/protocol.c +++ b/protocol.c @@ -521,6 +521,9 @@ qboolean EntityFrameCSQC_WriteFrame (sizebuf_t *msg, int maxsize, int numnumbers } else { + // save the cursize value in case we overflow and have to rollback + int oldcursize = msg->cursize; + // An update. sendflags = client->csqcentitysendflags[number]; // Nothing to send? FINE. @@ -531,8 +534,6 @@ qboolean EntityFrameCSQC_WriteFrame (sizebuf_t *msg, int maxsize, int numnumbers sendflags = 0xFFFFFF; // write an update - // save the cursize value in case we overflow and have to rollback - int oldcursize = msg->cursize; if (PRVM_serveredictfunction(ed, SendEntity)) { if(!sectionstarted) diff --git a/prvm_cmds.h b/prvm_cmds.h index e21a393f..75589dea 100644 --- a/prvm_cmds.h +++ b/prvm_cmds.h @@ -217,11 +217,15 @@ float getserverlistindexforkey(string key) // init code void PR_Cmd_Init(void); -// builtins and other general functions - +// general functions void VM_CheckEmptyString (prvm_prog_t *prog, const char *s); void VM_VarString(prvm_prog_t *prog, int first, char *out, int outlength); +prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, char *format); +void BufStr_Set(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer, int strindex, const char *str); +void BufStr_Del(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer); +void BufStr_Flush(prvm_prog_t *prog); +// builtins void VM_checkextension (prvm_prog_t *prog); void VM_error (prvm_prog_t *prog); void VM_objerror (prvm_prog_t *prog);