From: Julian Seward Date: Sat, 21 Apr 2012 22:33:44 +0000 (+0000) Subject: Kludge around a compiler warning, and add explanatory comment. X-Git-Tag: svn/VALGRIND_3_8_0~342 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e32523416eeed35adc7f41f28a73c2389294ded9;p=thirdparty%2Fvalgrind.git Kludge around a compiler warning, and add explanatory comment. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12526 --- diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index af6c29b3c1..a0d3d874bb 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -963,10 +963,13 @@ static size_t my_malloc_size ( void* zone, void* ptr ) 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),