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() DWORD ZFileWrite()
{ {
int res=0; DWORD res=0;
if (TextFile) if (TextFile)
res = fwrite(ZFileWriteBlock, res = fwrite(ZFileWriteBlock,
1, 1,

View File

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

View File

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

View File

@@ -63,7 +63,7 @@ SDLCFLAGS := $(shell sdl-config --cflags)
#LIBS=-static -pg ${SDLLIBS} -lz #LIBS=-static -pg ${SDLLIBS} -lz
LIBS=${SDLLIBS} -lz -lpng LIBS=${SDLLIBS} -lz -lpng
#CFLAGS=-pg -g -Wall -D__LINUX__ ${SDLCFLAGS} #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 ASM=nasm
ASMFLAGS=-f elf -D__LINUX__ -g -w-orphan-labels ASMFLAGS=-f elf -D__LINUX__ -g -w-orphan-labels
CC=gcc CC=gcc
@@ -105,7 +105,7 @@ ${CHIPDIR}/sfxproc.o: ${CHIPDIR}/sfxproc.asm macros.mac\
${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac ${CPUDIR}/regs.mac ${CPUDIR}/regsw.mac
${CHIPDIR}/dsp1emu.o: ${CHIPDIR}/dsp1emu.c betauser.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 ui.o: ui.asm macros.mac betauser.mac
cfgload.o:cfgload.asm macros.mac cfgload.o:cfgload.asm macros.mac
init.o:init.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 SineBlob(int x, int y, int radius, int height, int page);
static void CalcWater(int *nptr,int *optr,int density); 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 ox=80,oy=60;
static int xang,yang; static int xang,yang;
static int density=4; static int density=4;

View File

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