Commit d2e486e1 authored by Steven Fuller's avatar Steven Fuller

Few warning fixes for -Wall with optimizations

parent f2c29483
CC = gcc
#CFLAGS = -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
CFLAGS = -g -Wall
CFLAGS = -Wall -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
#CFLAGS = -g -Wall
#CFLAGS = -g
#CFLAGS = -Os
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)
======================
*/
void CA_LoadAllSounds (void)
void CA_LoadAllSounds()
{
unsigned start,i;
unsigned start, i;
switch (oldsoundmode)
{
case sdm_Off:
goto cachein;
case sdm_PC:
start = STARTPCSOUNDS;
break;
case sdm_AdLib:
start = STARTADLIBSOUNDS;
break;
default:
goto cachein;
}
for (i=0;i<NUMSOUNDS;i++,start++)
......@@ -812,14 +812,14 @@ cachein:
switch (SoundMode)
{
case sdm_Off:
return;
case sdm_PC:
start = STARTPCSOUNDS;
break;
case sdm_AdLib:
start = STARTADLIBSOUNDS;
break;
default:
return;
}
for (i=0;i<NUMSOUNDS;i++,start++)
......
......@@ -299,7 +299,7 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok,
{
boolean redraw,
cursorvis,cursormoved,
done,result;
done,result = true;
ScanCode sc;
char c,
s[MaxString],olds[MaxString];
......
......@@ -6,7 +6,7 @@
/* SDM = 2 */
/* SOD = 3 */
#ifndef WMODE
#define WMODE 3
#define WMODE 1
#endif
#if WMODE == 0
......
......@@ -768,7 +768,7 @@ void IN_ClearKeysDown(void)
///////////////////////////////////////////////////////////////////////////
void IN_ReadControl(int player,ControlInfo *info)
{
boolean realdelta;
boolean realdelta = false;
word buttons;
int dx,dy;
Motion mx,my;
......
......@@ -605,7 +605,7 @@ void IN_ClearKeysDown(void)
///////////////////////////////////////////////////////////////////////////
void IN_ReadControl(int player,ControlInfo *info)
{
boolean realdelta;
boolean realdelta = false;
word buttons;
int dx,dy;
Motion mx,my;
......
......@@ -1019,7 +1019,7 @@ void IN_ClearKeysDown(void)
///////////////////////////////////////////////////////////////////////////
void IN_ReadControl(int player,ControlInfo *info)
{
boolean realdelta;
boolean realdelta = false;
word buttons;
int dx,dy;
Motion mx,my;
......
......@@ -341,7 +341,7 @@ void T_Projectile (objtype *ob)
damage = (US_RndT() >>3);
break;
default:
break;
return;
}
TakeDamage (damage,ob);
......@@ -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)
{
word *map,tile;
word *map, tile = 0;
switch (which)
{
......
......@@ -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;
doornum = tilehit&0x7f;
......@@ -293,9 +293,9 @@ void HitHorizDoor (void)
====================
*/
void HitVertDoor (void)
void HitVertDoor()
{
unsigned texture,doorpage,doornum;
unsigned texture, doorpage = 0, doornum;
byte *wall;
doornum = tilehit&0x7f;
......
......@@ -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)
{
int j,exit,tick,redraw,which,x,picked;
int j,exit,tick,redraw,which = 0,x = 0,picked;
ControlInfo ci;
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