From 33c68846de10c53c56eba3a6f5ce7f8d52ddb735 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 1 Sep 2013 05:12:36 +0000 Subject: [PATCH] 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... --- intern/guardedalloc/intern/mmap_win.c | 2 +- intern/guardedalloc/mmap_win.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/intern/guardedalloc/intern/mmap_win.c b/intern/guardedalloc/intern/mmap_win.c index ab50edb811e..6f03188a579 100644 --- a/intern/guardedalloc/intern/mmap_win.c +++ b/intern/guardedalloc/intern/mmap_win.c @@ -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) { diff --git a/intern/guardedalloc/mmap_win.h b/intern/guardedalloc/mmap_win.h index c84882b1052..0f88a8e3ba8 100644 --- a/intern/guardedalloc/mmap_win.h +++ b/intern/guardedalloc/mmap_win.h @@ -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