From d50d721649faeae4634dc03f735fd5f685d69650 Mon Sep 17 00:00:00 2001 From: teuf <> Date: Wed, 16 May 2001 20:33:58 +0000 Subject: [PATCH] Removed several compilation warning. Thanks to aaronl for noticing that zip support wasn't working with -O2 because of a compilation warning --- zsnes/src/linux/zfilew.c | 2 +- zsnes/src/linux/zloaderw.c | 18 +++++++++--------- zsnes/src/linux/ztcp.c | 2 +- zsnes/src/makefile.linux | 4 ++-- zsnes/src/water.c | 2 +- zsnes/src/zip/zzip.c | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/zsnes/src/linux/zfilew.c b/zsnes/src/linux/zfilew.c index 70a3abb7..7f8d098d 100644 --- a/zsnes/src/linux/zfilew.c +++ b/zsnes/src/linux/zfilew.c @@ -208,7 +208,7 @@ DWORD ZFileRead() DWORD ZFileWrite() { - int res=0; + DWORD res=0; if (TextFile) res = fwrite(ZFileWriteBlock, 1, diff --git a/zsnes/src/linux/zloaderw.c b/zsnes/src/linux/zloaderw.c index fa7a8290..189ae5d9 100644 --- a/zsnes/src/linux/zloaderw.c +++ b/zsnes/src/linux/zloaderw.c @@ -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; diff --git a/zsnes/src/linux/ztcp.c b/zsnes/src/linux/ztcp.c index 6165a5ba..93fff09a 100644 --- a/zsnes/src/linux/ztcp.c +++ b/zsnes/src/linux/ztcp.c @@ -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; diff --git a/zsnes/src/makefile.linux b/zsnes/src/makefile.linux index e81f9c4b..49ad2e14 100644 --- a/zsnes/src/makefile.linux +++ b/zsnes/src/makefile.linux @@ -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 diff --git a/zsnes/src/water.c b/zsnes/src/water.c index 729ccc83..a0800b07 100644 --- a/zsnes/src/water.c +++ b/zsnes/src/water.c @@ -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; diff --git a/zsnes/src/zip/zzip.c b/zsnes/src/zip/zzip.c index 3fc6f7d4..da3161ad 100644 --- a/zsnes/src/zip/zzip.c +++ b/zsnes/src/zip/zzip.c @@ -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)