remove gcc4-only warning option

master
leitner 20 years ago
parent 05bf627d01
commit 9405f1271b

@ -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),)

@ -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;
}

@ -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,(bytes<BUFSIZE)?bytes:BUFSIZE))<=0)
return (sent?sent:-1);
return (sent?(int64)sent:-1);
while (n>0) {
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;
}

Loading…
Cancel
Save