Commit d2e486e1 authored by Steven Fuller's avatar Steven Fuller

Few warning fixes for -Wall with optimizations

parent f2c29483
CC = gcc CC = gcc
#CFLAGS = -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro CFLAGS = -Wall -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
CFLAGS = -g -Wall #CFLAGS = -g -Wall
#CFLAGS = -g #CFLAGS = -g
#CFLAGS = -Os #CFLAGS = -Os
OBJS = objs.o misc.o id_ca.o id_sd.o id_vh.o id_us.o \ OBJS = objs.o misc.o id_ca.o id_sd.o id_vh.o id_us.o \
......
...@@ -787,20 +787,20 @@ void CA_UnCacheAudioChunk(int chunk) ...@@ -787,20 +787,20 @@ void CA_UnCacheAudioChunk(int chunk)
====================== ======================
*/ */
void CA_LoadAllSounds (void) void CA_LoadAllSounds()
{ {
unsigned start,i; unsigned start, i;
switch (oldsoundmode) switch (oldsoundmode)
{ {
case sdm_Off:
goto cachein;
case sdm_PC: case sdm_PC:
start = STARTPCSOUNDS; start = STARTPCSOUNDS;
break; break;
case sdm_AdLib: case sdm_AdLib:
start = STARTADLIBSOUNDS; start = STARTADLIBSOUNDS;
break; break;
default:
goto cachein;
} }
for (i=0;i<NUMSOUNDS;i++,start++) for (i=0;i<NUMSOUNDS;i++,start++)
...@@ -812,14 +812,14 @@ cachein: ...@@ -812,14 +812,14 @@ cachein:
switch (SoundMode) switch (SoundMode)
{ {
case sdm_Off:
return;
case sdm_PC: case sdm_PC:
start = STARTPCSOUNDS; start = STARTPCSOUNDS;
break; break;
case sdm_AdLib: case sdm_AdLib:
start = STARTADLIBSOUNDS; start = STARTADLIBSOUNDS;
break; break;
default:
return;
} }
for (i=0;i<NUMSOUNDS;i++,start++) for (i=0;i<NUMSOUNDS;i++,start++)
......
...@@ -299,7 +299,7 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok, ...@@ -299,7 +299,7 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok,
{ {
boolean redraw, boolean redraw,
cursorvis,cursormoved, cursorvis,cursormoved,
done,result; done,result = true;
ScanCode sc; ScanCode sc;
char c, char c,
s[MaxString],olds[MaxString]; s[MaxString],olds[MaxString];
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* SDM = 2 */ /* SDM = 2 */
/* SOD = 3 */ /* SOD = 3 */
#ifndef WMODE #ifndef WMODE
#define WMODE 3 #define WMODE 1
#endif #endif
#if WMODE == 0 #if WMODE == 0
......
...@@ -768,7 +768,7 @@ void IN_ClearKeysDown(void) ...@@ -768,7 +768,7 @@ void IN_ClearKeysDown(void)
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void IN_ReadControl(int player,ControlInfo *info) void IN_ReadControl(int player,ControlInfo *info)
{ {
boolean realdelta; boolean realdelta = false;
word buttons; word buttons;
int dx,dy; int dx,dy;
Motion mx,my; Motion mx,my;
......
...@@ -605,7 +605,7 @@ void IN_ClearKeysDown(void) ...@@ -605,7 +605,7 @@ void IN_ClearKeysDown(void)
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void IN_ReadControl(int player,ControlInfo *info) void IN_ReadControl(int player,ControlInfo *info)
{ {
boolean realdelta; boolean realdelta = false;
word buttons; word buttons;
int dx,dy; int dx,dy;
Motion mx,my; Motion mx,my;
......
...@@ -1019,7 +1019,7 @@ void IN_ClearKeysDown(void) ...@@ -1019,7 +1019,7 @@ void IN_ClearKeysDown(void)
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void IN_ReadControl(int player,ControlInfo *info) void IN_ReadControl(int player,ControlInfo *info)
{ {
boolean realdelta; boolean realdelta = false;
word buttons; word buttons;
int dx,dy; int dx,dy;
Motion mx,my; Motion mx,my;
......
...@@ -341,7 +341,7 @@ void T_Projectile (objtype *ob) ...@@ -341,7 +341,7 @@ void T_Projectile (objtype *ob)
damage = (US_RndT() >>3); damage = (US_RndT() >>3);
break; break;
default: default:
break; return;
} }
TakeDamage (damage,ob); TakeDamage (damage,ob);
...@@ -832,7 +832,7 @@ statetype s_gretelshoot8 = {false,SPR_GRETEL_SHOOT1,10,NULL,NULL,&s_gretelchase ...@@ -832,7 +832,7 @@ statetype s_gretelshoot8 = {false,SPR_GRETEL_SHOOT1,10,NULL,NULL,&s_gretelchase
void SpawnStand (enemy_t which, int tilex, int tiley, int dir) void SpawnStand (enemy_t which, int tilex, int tiley, int dir)
{ {
word *map,tile; word *map, tile = 0;
switch (which) switch (which)
{ {
......
...@@ -251,9 +251,9 @@ void ScalePost(byte *wall, int texture) ...@@ -251,9 +251,9 @@ void ScalePost(byte *wall, int texture)
==================== ====================
*/ */
void HitHorizDoor (void) void HitHorizDoor()
{ {
unsigned texture,doorpage,doornum; unsigned texture, doorpage = 0, doornum;
byte *wall; byte *wall;
doornum = tilehit&0x7f; doornum = tilehit&0x7f;
...@@ -293,9 +293,9 @@ void HitHorizDoor (void) ...@@ -293,9 +293,9 @@ void HitHorizDoor (void)
==================== ====================
*/ */
void HitVertDoor (void) void HitVertDoor()
{ {
unsigned texture,doorpage,doornum; unsigned texture, doorpage = 0, doornum;
byte *wall; byte *wall;
doornum = tilehit&0x7f; doornum = tilehit&0x7f;
......
...@@ -1876,7 +1876,7 @@ int moveorder[4]={LEFT,RIGHT,FWRD,BKWD}; ...@@ -1876,7 +1876,7 @@ int moveorder[4]={LEFT,RIGHT,FWRD,BKWD};
void EnterCtrlData(int index,CustomCtrls *cust,void (*DrawRtn)(int),void (*PrintRtn)(int),int type) void EnterCtrlData(int index,CustomCtrls *cust,void (*DrawRtn)(int),void (*PrintRtn)(int),int type)
{ {
int j,exit,tick,redraw,which,x,picked; int j,exit,tick,redraw,which = 0,x = 0,picked;
ControlInfo ci; ControlInfo ci;
ShootSnd(); ShootSnd();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment