|
From: <sv...@va...> - 2012-04-21 22:33:51
|
sewardj 2012-04-21 23:33:44 +0100 (Sat, 21 Apr 2012)
New Revision: 12526
Log:
Kludge around a compiler warning, and add explanatory comment.
Modified files:
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.c (+4 -1)
===================================================================
--- trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2012-04-21 16:43:25 +01:00 (rev 12525)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2012-04-21 23:33:44 +01:00 (rev 12526)
@@ -963,10 +963,13 @@
return res;
}
+/* Note that the (void*) casts below are a kludge which stops
+ compilers complaining about the fact that the the replacement
+ functions aren't really of the right type. */
static vki_malloc_zone_t vg_default_zone = {
NULL, // reserved1
NULL, // reserved2
- my_malloc_size, // JRS fixme: is this right?
+ (void*)my_malloc_size, // JRS fixme: is this right?
(void*)VG_REPLACE_FUNCTION_EZU(10020,VG_Z_LIBC_SONAME,malloc_zone_malloc),
(void*)VG_REPLACE_FUNCTION_EZU(10060,VG_Z_LIBC_SONAME,malloc_zone_calloc),
(void*)VG_REPLACE_FUNCTION_EZU(10130,VG_Z_LIBC_SONAME,malloc_zone_valloc),
|