From 9405f1271bf8e1e526a2a2c51a8cf0252f4ac641 Mon Sep 17 00:00:00 2001 From: leitner Date: Tue, 3 May 2005 12:14:29 +0000 Subject: [PATCH] remove gcc4-only warning option --- GNUmakefile | 2 +- array/array_get.c | 2 +- io/io_mmapwritefile.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 088c8e1..b60fdca 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -18,7 +18,7 @@ CC=gcc CFLAGS=-pipe -W -Wall -O2 -fomit-frame-pointer #CFLAGS=-pipe -Os -march=pentiumpro -mcpu=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall -CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2 +# CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2 # startrip ifneq ($(DEBUG),) diff --git a/array/array_get.c b/array/array_get.c index 2cc4e20..8ed51cd 100644 --- a/array/array_get.c +++ b/array/array_get.c @@ -25,6 +25,6 @@ void* array_get(array* x,uint64 membersize,int64 pos) { if (__unlikely(pos+1<1)) return 0; if (__unlikely(!umult64(membersize,pos,&wanted))) return 0; - if (__unlikely(wanted >= x->allocated)) return 0; + if (__unlikely((int64)wanted >= x->allocated)) return 0; return x->p+pos*membersize; } diff --git a/io/io_mmapwritefile.c b/io/io_mmapwritefile.c index 8866fc4..a1a50d5 100644 --- a/io/io_mmapwritefile.c +++ b/io/io_mmapwritefile.c @@ -17,7 +17,7 @@ int64 io_mmapwritefile(int64 out,int64 in,uint64 off,uint64 bytes,io_write_callb io_entry* e=array_get(&io_fds,sizeof(io_entry),out); if (e) { const char* c; - long left; + unsigned long left; #ifdef __MINGW32__ if (!e->mh) e->mh=CreateFileMapping(out,0,PAGE_READONLY,0,0,NULL); if (!e->mh) goto readwrite; @@ -66,7 +66,7 @@ int64 io_mmapwritefile(int64 out,int64 in,uint64 off,uint64 bytes,io_write_callb e->mmapped=0; return -3; } - return sent?sent:-1; + return sent?(int64)sent:-1; } if (m==0) return sent; sent+=m; @@ -87,12 +87,12 @@ int64 io_mmapwritefile(int64 out,int64 in,uint64 off,uint64 bytes,io_write_callb return sent; } readwrite: - if (lseek(in,off,SEEK_SET) != off) + if (lseek(in,off,SEEK_SET) != (off_t)off) return -1; while (bytes>0) { char* tmp=buf; if ((n=read(in,tmp,(bytes0) { if ((m=writecb(out,tmp,n))<0) { if (m==-1) { @@ -100,7 +100,7 @@ readwrite: e->canwrite=0; e->next_write=-1; } - return errno==EAGAIN?(sent?sent:-1):-3; + return errno==EAGAIN?(sent?(int64)sent:-1):-3; } goto abort; }