[asterisk-commits] tilghman: branch tilghman/malloc_hold r209599 - /team/tilghman/malloc_hold/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 30 14:26:36 CDT 2009


Author: tilghman
Date: Thu Jul 30 14:26:32 2009
New Revision: 209599

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=209599
Log:
More OpenBSD warnings

Modified:
    team/tilghman/malloc_hold/main/astmm.c

Modified: team/tilghman/malloc_hold/main/astmm.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tilghman/malloc_hold/main/astmm.c?view=diff&rev=209599&r1=209598&r2=209599
==============================================================================
--- team/tilghman/malloc_hold/main/astmm.c (original)
+++ team/tilghman/malloc_hold/main/astmm.c Thu Jul 30 14:26:32 2009
@@ -36,7 +36,9 @@
 #ifdef MALLOC_HOLD
 #include <sys/mman.h>
 #include <signal.h>
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__Darwin__)
 #include <malloc.h>
+#endif
 #include <errno.h>
 #endif /* MALLOC_HOLD */
 
@@ -195,7 +197,7 @@
 				astmm_log("Intercepted invalid %s to %p (%p+%d), originally allocated in %s at %s:%u and freed in %s at %s:%u\n",
 					violations[last_seen_violation].error == PROT_READ ? "read" : "write",
 					violations[last_seen_violation].violation, cur->data,
-					violations[last_seen_violation].violation - (void *) cur->data,
+					(int) (violations[last_seen_violation].violation - (void *) cur->data),
 					cur->alloc_func, cur->alloc_file, cur->alloc_lineno,
 					cur->free_func, cur->free_file, cur->free_lineno);
 				memset(&violations[last_seen_violation], 0, sizeof(violations[0]));




More information about the asterisk-commits mailing list