From 960d1c3616292a37d5214a5e36e94dad296e5d57 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 13 Jan 2019 17:56:26 +0000 Subject: [PATCH] fix some warnings. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5380 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/m_items.c | 2 ++ engine/client/m_multi.c | 1 - engine/common/q1bsp.c | 2 +- engine/gl/gl_ngraph.c | 32 +++----------------------------- engine/server/sv_move.c | 3 ++- 5 files changed, 8 insertions(+), 32 deletions(-) diff --git a/engine/client/m_items.c b/engine/client/m_items.c index 064828b3a..33e1edc1e 100644 --- a/engine/client/m_items.c +++ b/engine/client/m_items.c @@ -373,6 +373,8 @@ static qboolean M_MouseMoved(menu_t *menu) switch(option->common.type) { + default: + break; case mt_framestart: ypos += framescroll; framescroll = 0; diff --git a/engine/client/m_multi.c b/engine/client/m_multi.c index 1c54375b2..c10d2db59 100644 --- a/engine/client/m_multi.c +++ b/engine/client/m_multi.c @@ -445,7 +445,6 @@ void M_Menu_Setup_f (void) "female", NULL }; - mpic_t *p; menucustom_t *cu; Key_Dest_Add(kdm_emenu); diff --git a/engine/common/q1bsp.c b/engine/common/q1bsp.c index 2acda84ce..512f27a03 100644 --- a/engine/common/q1bsp.c +++ b/engine/common/q1bsp.c @@ -721,7 +721,7 @@ static int Q1_HullPointContents (hull_t *hull, int num, vec3_t p) #define DIST_EPSILON (0.03125) #if 1 -static const q1toftecontents[] = +static const unsigned int q1toftecontents[] = { 0,//EMPTY FTECONTENTS_SOLID,//SOLID diff --git a/engine/gl/gl_ngraph.c b/engine/gl/gl_ngraph.c index e58ac12fd..d91b36e98 100644 --- a/engine/gl/gl_ngraph.c +++ b/engine/gl/gl_ngraph.c @@ -41,48 +41,24 @@ static struct } ngraph[NET_TIMINGS]; #endif -//instead of assuming the quake palette, we should use a predictable lookup table. it makes the docs much easier. -static unsigned ngraph_palette[] = -{ - 0xff00ffff, //yellow - 0xff00efef, //yellow2 - 0xff0000ff, //red - 0xff0000ef, //red2 - 0xffff0000, //blue - 0xffef0000, //blue2 - 0xffffffff, //white - 0xffefefef, //white2 - 0x00000000 //invisible. -}; - static void R_LineGraph (int x, float h) { int s; - unsigned color, color2; + unsigned color; s = NET_GRAPHHEIGHT; if (h == 10000 || h<0) { color = 0xff00ffff; // yellow - color2 = 0xff00efef; h=fabs(h); } else if (h == 9999) - { color = 0xff0000ff; // red - color2 = 0xff0000ff; - } else if (h == 9998) - { color = 0xffff0000; // blue - color2 = 0xffef0000; - } else - { color = 0xffffffff; // white - color2 = 0xffefefef; - } #ifdef GRAPHTEX if (h>s) @@ -90,7 +66,7 @@ static void R_LineGraph (int x, float h) for (i=0 ; iservertime - cl.servertime)*NET_GRAPHHEIGHT*5:0); for (a=0 ; a