[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59699] trunk/blender/intern/guardedalloc: Mingw/Windows Compiling Fix

Joshua Leung aligorith at gmail.com
Sun Sep 1 07:12:37 CEST 2013


Revision: 59699
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59699
Author:   aligorith
Date:     2013-09-01 05:12:36 +0000 (Sun, 01 Sep 2013)
Log Message:
-----------
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...

Modified Paths:
--------------
    trunk/blender/intern/guardedalloc/intern/mmap_win.c
    trunk/blender/intern/guardedalloc/mmap_win.h

Modified: trunk/blender/intern/guardedalloc/intern/mmap_win.c
===================================================================
--- trunk/blender/intern/guardedalloc/intern/mmap_win.c	2013-09-01 03:43:10 UTC (rev 59698)
+++ trunk/blender/intern/guardedalloc/intern/mmap_win.c	2013-09-01 05:12:36 UTC (rev 59699)
@@ -159,7 +159,7 @@
 }
 
 /* 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) {

Modified: trunk/blender/intern/guardedalloc/mmap_win.h
===================================================================
--- trunk/blender/intern/guardedalloc/mmap_win.h	2013-09-01 03:43:10 UTC (rev 59698)
+++ trunk/blender/intern/guardedalloc/mmap_win.h	2013-09-01 05:12:36 UTC (rev 59699)
@@ -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
 




More information about the Bf-blender-cvs mailing list