From 45a612bd1e80c5fe53c1d8cbc3b6e9781797b4f6 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Thu, 28 Feb 2002 02:58:30 +0000 Subject: [PATCH] fix mingw warnings git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1590 d7cf8633-e32d-0410-b094-e92efae38249 --- conproc.c | 1 + in_win.c | 5 +++-- makefile.mingw | 10 +++++++--- snd_win.c | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/conproc.c b/conproc.c index 560be1f1..30ac3339 100644 --- a/conproc.c +++ b/conproc.c @@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // conproc.c #include +#include #include "conproc.h" #include "quakedef.h" diff --git a/in_win.c b/in_win.c index 35e01381..04cdbcdc 100644 --- a/in_win.c +++ b/in_win.c @@ -529,7 +529,7 @@ IN_MouseMove */ void IN_MouseMove (usercmd_t *cmd) { - int i, mx, my, mouselook = (in_mlook.state & 1) || freelook.integer; + int i, mx, my; DIDEVICEOBJECTDATA od; DWORD dwElements; HRESULT hr; @@ -703,6 +703,7 @@ void IN_StartupJoystick (void) int numdevs; JOYCAPS jc; MMRESULT mmr; + mmr = 0; // assume no joystick joy_avail = false; @@ -956,7 +957,7 @@ qboolean IN_ReadJoystick (void) else { // read error occurred - // turning off the joystick seems too harsh for 1 read error,\ + // turning off the joystick seems too harsh for 1 read error, // but what should be done? // Con_Printf ("IN_ReadJoystick: no response\n"); // joy_avail = false; diff --git a/makefile.mingw b/makefile.mingw index f10b2a15..174ce775 100644 --- a/makefile.mingw +++ b/makefile.mingw @@ -1,3 +1,4 @@ + OBJECTS= builddate.o chase.o cl_demo.o cl_input.o cl_main.o cl_parse.o cl_tent.o cmd.o common.o console.o crc.o cvar.o fractalnoise.o gl_draw.o r_sky.o gl_rmain.o gl_rsurf.o host.o host_cmd.o image.o keys.o mathlib.o menu.o model_alias.o model_brush.o model_shared.o model_sprite.o net_dgrm.o net_loop.o net_main.o pr_cmds.o pr_edict.o pr_exec.o r_light.o r_particles.o r_explosion.o sbar.o snd_dma.o snd_mem.o snd_mix.o sv_main.o sv_move.o sv_phys.o sv_user.o sv_light.o transform.o view.o wad.o world.o zone.o vid_shared.o palette.o r_crosshairs.o gl_textures.o gl_models.o r_sprites.o r_modules.o r_explosion.o r_lerpanim.o protocol.o quakeio.o r_clip.o ui.o portals.o sys_shared.o cl_light.o gl_backend.o cl_particles.o cl_screen.o cgamevm.o cgame.o #K6/athlon optimizations @@ -10,16 +11,17 @@ CPUOPTIMIZATIONS=-march=i686 #this is used to ensure that all released versions are free of warnings. OPTIMIZATIONS= -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations $(CPUOPTIMIZATIONS) -CFLAGS= -I/usr/local/mingw/include -MD -Wall $(OPTIMIZATIONS) # -Werror # -D WIN32 -D NDEBUG -D _WINDOWS -D _M_IX86 +CFLAGS= -I/usr/local/mingw/include -MD -Wall $(OPTIMIZATIONS) LDFLAGS= -L/msdev/lib -L/usr/local/mingw/lib -luser32 -lgdi32 -lwinmm -ldxguid -ldinput -lopengl32 -lcomctl32 -lwsock32 all: builddate darkplaces builddate: - touch builddate.c + del builddate.o + del builddate.d .c.o: gcc $(CFLAGS) -c $*.c @@ -29,7 +31,9 @@ darkplaces: $(OBJECTS) vid_wgl.o sys_win.o snd_win.o net_win.o net_wins.o net_wi clean: - -rm -f darkplaces *.o *.d + del darkplaces.exe + del *.o + del *.d .PHONY: clean builddate diff --git a/snd_win.c b/snd_win.c index 1fb72b99..2a6c088a 100644 --- a/snd_win.c +++ b/snd_win.c @@ -654,6 +654,8 @@ int SNDDMA_GetDMAPos(void) { s = snd_sent * WAV_BUFFER_SIZE; } + else + s = 0; s >>= sample16; -- 2.39.2