Removed several compilation warning. Thanks to aaronl for noticing that zip support wasn't working with -O2 because of a compilation warning

This commit is contained in:
teuf
2001-05-16 20:33:58 +00:00
parent f92e4a5fe7
commit d50d721649
6 changed files with 15 additions and 15 deletions

View File

@@ -208,7 +208,7 @@ DWORD ZFileRead()
DWORD ZFileWrite()
{
int res=0;
DWORD res=0;
if (TextFile)
res = fwrite(ZFileWriteBlock,
1,

View File

@@ -94,7 +94,7 @@ int my_atoi(char *nptr) {
extern void UnProtectMemory (void);
int main (int argc, char *argv[]) {
int opt,hasroom,p,pp;
int opt,p,pp;
char *fvar;
@@ -108,7 +108,7 @@ int main (int argc, char *argv[]) {
}
/* Player 1 Input */
case '1': {
if (!hasroom) return 4;
//if (!hasroom) return 4;
pl1contrl = my_atoi(optarg);
if (pl1contrl > 6) return 15;
@@ -119,7 +119,7 @@ int main (int argc, char *argv[]) {
}
/* Player 2 Input */
case '2': {
if (!hasroom) return 4;
// if (!hasroom) return 4;
pl2contrl=my_atoi(optarg);
if (pl2contrl > 6) return 15;
@@ -192,7 +192,7 @@ int main (int argc, char *argv[]) {
}
case 'f': {
if (!hasroom) return 4;
// if (!hasroom) return 4;
frameskip = my_atoi(optarg);
if (frameskip > 9) return 10;
@@ -201,7 +201,7 @@ int main (int argc, char *argv[]) {
}
case 'g': {
if (!hasroom) return 4;
// if (!hasroom) return 4;
gammalevel = my_atoi(optarg);
if (gammalevel > 5) return 11;
@@ -227,7 +227,7 @@ int main (int argc, char *argv[]) {
}
case 'k': {
if (!hasroom) return 4;
// if (!hasroom) return 4;
MusicRelVol = my_atoi(optarg);
if (MusicRelVol > 100) return 16;
@@ -262,7 +262,7 @@ int main (int argc, char *argv[]) {
}
case 'p': {
if (!hasroom) return 4;
// if (!hasroom) return 4;
per2exec = my_atoi(optarg);
if (per2exec > 150) return 14;
@@ -274,7 +274,7 @@ int main (int argc, char *argv[]) {
}
case 'r': {
if (!hasroom) return 4;
// if (!hasroom) return 4;
SoundQuality = my_atoi(optarg);
if (SoundQuality > 5) return 12;
@@ -315,7 +315,7 @@ int main (int argc, char *argv[]) {
V8Mode = 1;
pp++;
} else {
if (!hasroom) return 4;
// if (!hasroom) return 4;
cvidmode = my_atoi(optarg);
if (cvidmode > 10) return 13;

View File

@@ -285,7 +285,7 @@ int ConnectServer(char *servername, unsigned int port)
{
char blah[255];
int retval,i;
LPHOSTENT host1;
LPHOSTENT host1=NULL;
int yesip;
#ifndef __LINUX__
WSADATA wsadata;

View File

@@ -63,7 +63,7 @@ SDLCFLAGS := $(shell sdl-config --cflags)
#LIBS=-static -pg ${SDLLIBS} -lz
LIBS=${SDLLIBS} -lz -lpng
#CFLAGS=-pg -g -Wall -D__LINUX__ ${SDLCFLAGS}
CFLAGS=-g -Wall -mcpu=pentium -finline-functions -funroll-loops -D__LINUX__ ${SDLCFLAGS}
CFLAGS=-g -Wall -O2 -mcpu=pentium -finline-functions -funroll-loops -D__LINUX__ ${SDLCFLAGS}
ASM=nasm
ASMFLAGS=-f elf -D__LINUX__ -g -w-orphan-labels
CC=gcc
@@ -105,7 +105,7 @@ ${CHIPDIR}/sfxproc.o: ${CHIPDIR}/sfxproc.asm macros.mac\
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
${CHIPDIR}/dsp1emu.o: ${CHIPDIR}/dsp1emu.c betauser.mac
${CC} ${CFLAGS} -O2 -o $@ -c $<
${CC} ${CFLAGS} -o $@ -c $<
ui.o: ui.asm macros.mac betauser.mac
cfgload.o:cfgload.asm macros.mac
init.o:init.asm macros.mac

View File

@@ -40,7 +40,7 @@ void DrawWaterWithLight(int *ptr,int light);
static void SineBlob(int x, int y, int radius, int height, int page);
static void CalcWater(int *nptr,int *optr,int density);
static int x,y;
//static int x,y;
static int ox=80,oy=60;
static int xang,yang;
static int density=4;

View File

@@ -188,7 +188,7 @@ int do_extract_currentfile(unzFile uf,
if (((*popt_overwrite)==0) && (err==UNZ_OK))
{
char rep;
char rep='A';
FILE* ftestexist;
ftestexist = fopen(write_filename,"rb");
if (ftestexist!=NULL)