Minor fix for pedantic compiler
| From: | l0t3k | Date: | Mon, 20 Sep 2004 05:31:20 +0000 |
| Subject: | Minor fix for pedantic compiler | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-12912@lists.php.net to get a copy of this message | ||
i'm compiling a C++ extension and the smart_str macros are causing MSVC to
spill warnings about converting void* to char *.
Casting the return from the SMART_STR_REALLOC macro seems to fix it.
#ifdef SMART_STR_USE_REALLOC
-#define SMART_STR_REALLOC(a,b,c) realloc((a),(b))
+#define SMART_STR_REALLOC(a,b,c) (char *)realloc((a),(b))
#else
-#define SMART_STR_REALLOC(a,b,c) perealloc((a),(b),(c))
+#define SMART_STR_REALLOC(a,b,c) (char *)perealloc((a),(b))
#endif
---