Mingw/Windows Compiling Fix

This commit attempts to fix the following error:

intern\guardedalloc\intern\mallocn.c: In function 'rem_memblock':
intern\guardedalloc\intern\mallocn.c:977:48: error: conversion to 'intptr_t' from 'size_t' may change the sign of the result [-Werror=sign-conversion]

From the references I've managed to find, it appears that
the second arg to munmap() should be size_t not intptr_t.
Fortunately though, we don't use this arg anyways atm, so 
this should be quite harmless...
This commit is contained in:
Joshua Leung 2013-09-01 05:12:36 +00:00
parent 9d04a61f36
commit 33c68846de
2 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ void *mmap(void *UNUSED(start), size_t len, int prot, int flags, int fd, off_t o
}
/* munmap for windows */
intptr_t munmap(void *ptr, intptr_t UNUSED(size))
intptr_t munmap(void *ptr, size_t UNUSED(size))
{
MemMap *mm = mmap_findlink(mmapbase, ptr);
if (!mm) {

View File

@ -52,7 +52,7 @@
#include "../../source/blender/blenlib/BLI_sys_types.h"
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset);
intptr_t munmap(void *ptr, intptr_t size);
intptr_t munmap(void *ptr, size_t size);
#endif