enable -Werror and clean up the resulting mess

This commit is contained in:
Bill Currie 2000-08-20 06:23:17 +00:00
parent 5745025a85
commit a6415d5601
10 changed files with 21 additions and 17 deletions

View file

@ -929,7 +929,7 @@ fi
dnl We want warnings, lots of warnings...
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall"
# CFLAGS="$CFLAGS -Werror"
CFLAGS="$CFLAGS -Werror"
# CFLAGS="$CFLAGS -Wall -pedantic"
fi

View file

@ -32,6 +32,8 @@
#include "quakedef.h"
qboolean SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1, vec3_t p2, trace_t *trace);
cvar_t chase_back = {"chase_back", "100"};
cvar_t chase_up = {"chase_up", "16"};
cvar_t chase_right = {"chase_right", "0"};

View file

@ -186,26 +186,30 @@ float CL_KeyState (kbutton_t *key)
down = key->state & 1;
val = 0;
if (impulsedown && !impulseup)
if (impulsedown && !impulseup) {
if (down)
val = 0.5; // pressed and held this frame
else
val = 0; // I_Error ();
if (impulseup && !impulsedown)
}
if (impulseup && !impulsedown) {
if (down)
val = 0; // I_Error ();
else
val = 0; // released this frame
if (!impulsedown && !impulseup)
}
if (!impulsedown && !impulseup) {
if (down)
val = 1.0; // held the entire frame
else
val = 0; // up the entire frame
if (impulsedown && impulseup)
}
if (impulsedown && impulseup) {
if (down)
val = 0.75; // released and re-pressed this frame
else
val = 0.25; // pressed and released this frame
}
key->state &= 1; // clear impulses

View file

@ -346,7 +346,6 @@ void CL_ParseUpdate (int bits)
qboolean forcelink;
entity_t *ent;
int num;
int skin;
if (cls.signon == SIGNONS - 1)
{ // first update is the final signon stage

View file

@ -118,8 +118,6 @@ Draw_Init
*/
void Draw_Init (void)
{
int i;
draw_chars = W_GetLumpName ("conchars");
draw_disc = W_GetLumpName ("disc");
draw_backtile = W_GetLumpName ("backtile");

View file

@ -1528,7 +1528,7 @@ Host_Give_f
void Host_Give_f (void)
{
char *t;
int v, w;
int v;
eval_t *val;
if (cmd_source == src_command)

View file

@ -2002,17 +2002,19 @@ forward:
}
}
if (DirectConfig && (serialConfig_cursor == 3 || serialConfig_cursor == 4))
if (DirectConfig && (serialConfig_cursor == 3 || serialConfig_cursor == 4)) {
if (key == K_UPARROW)
serialConfig_cursor = 2;
else
serialConfig_cursor = 5;
}
if (SerialConfig && StartingGame && serialConfig_cursor == 4)
if (SerialConfig && StartingGame && serialConfig_cursor == 4) {
if (key == K_UPARROW)
serialConfig_cursor = 3;
else
serialConfig_cursor = 5;
}
}
//=============================================================================
@ -2375,11 +2377,12 @@ void M_LanConfig_Key (int key)
}
}
if (StartingGame && lanConfig_cursor == 2)
if (StartingGame && lanConfig_cursor == 2) {
if (key == K_UPARROW)
lanConfig_cursor = 1;
else
lanConfig_cursor = 0;
}
l = Q_atoi(lanConfig_portname);
if (l > 65535)

View file

@ -35,6 +35,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/param.h>
#include <sys/ioctl.h>

View file

@ -1177,7 +1177,6 @@ Sbar_DeathmatchOverlay
*/
void Sbar_MiniDeathmatchOverlay (void)
{
qpic_t *pic;
int i, k, l;
int top, bottom;
int x, y, f;

View file

@ -190,7 +190,7 @@ PIXEL24 xlib_rgb24(int r,int g,int b)
void st2_fixup( XImage *framebuf, int x, int y, int width, int height)
{
int xi,yi;
int yi;
unsigned char *src;
PIXEL16 *dest;
register int count, n;
@ -226,7 +226,7 @@ void st2_fixup( XImage *framebuf, int x, int y, int width, int height)
void st3_fixup( XImage *framebuf, int x, int y, int width, int height)
{
int xi,yi;
int yi;
unsigned char *src;
PIXEL24 *dest;
register int count, n;
@ -964,8 +964,6 @@ void GetEvent(void)
void VID_Update (vrect_t *rects)
{
vrect_t full;
// if the window changes dimension, skip this frame
if (config_notify)