diff options
author | Matthias Hopf <mat@mshopf.de> | 2006-05-22 16:57:36 +0000 |
---|---|---|
committer | Matthias Hopf <mat@mshopf.de> | 2006-05-22 16:57:36 +0000 |
commit | e25e5998d1e8a3ffb3417a0effe1b7ce5999bbb5 (patch) | |
tree | 7e967eafae36f65784c930c30d25ae2c3821a2a2 /src/libw32dll/wine/ext.c | |
parent | 2bb7dbae2dc7e959d2ac5d416431bfed7201c51a (diff) | |
download | xine-lib-e25e5998d1e8a3ffb3417a0effe1b7ce5999bbb5.tar.gz xine-lib-e25e5998d1e8a3ffb3417a0effe1b7ce5999bbb5.tar.bz2 |
Fixed gcc warnings (Adrian Schroeter).
CVS patchset: 7993
CVS date: 2006/05/22 16:57:36
Diffstat (limited to 'src/libw32dll/wine/ext.c')
-rw-r--r-- | src/libw32dll/wine/ext.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libw32dll/wine/ext.c b/src/libw32dll/wine/ext.c index 8a791cab9..596c85c55 100644 --- a/src/libw32dll/wine/ext.c +++ b/src/libw32dll/wine/ext.c @@ -467,14 +467,14 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec return NULL; } - if (type&MEM_RESERVE && (unsigned)address&0xffff) { - size += (unsigned)address&0xffff; - address = (LPVOID)((unsigned)address & ~0xffff); + if (type&MEM_RESERVE && (void*)((unsigned long)address&0xffff)) { + size += (unsigned long)address&0xffff; + address = (LPVOID)((unsigned long)address & ~0xffff); } pgsz = sysconf(_SC_PAGESIZE); - if (type&MEM_COMMIT && (unsigned)address%pgsz) { - size += (unsigned)address%pgsz; - address -= (unsigned)address%pgsz; + if (type&MEM_COMMIT && (void*)((unsigned long)address%pgsz)) { + size += (unsigned long)address%pgsz; + address -= (unsigned long)address%pgsz; } if (type&MEM_RESERVE && size<0x10000) size = 0x10000; @@ -486,12 +486,12 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec virt_alloc* str=vm; while(str) { - if((unsigned)address>=(unsigned)str->address+str->mapping_size) + if((void*)((unsigned long)address)>=(void*)((unsigned long)str->address+str->mapping_size)) { str=str->prev; continue; } - if((unsigned)address+size<=(unsigned)str->address) + if((void*)((unsigned long)address+size)<=(void*)((unsigned long)str->address)) { str=str->prev; continue; @@ -499,8 +499,8 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec if(str->state==0) { #warning FIXME - if( ((unsigned)address >= (unsigned)str->address) - && ((unsigned)address+size<=(unsigned)str->address+str->mapping_size) + if( (address >= (void*)(unsigned long)str->address) + && ((void*)((unsigned long)address+size)<=(void*)((unsigned long)str->address+str->mapping_size)) && (type & MEM_COMMIT)) { close(fd); |