Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12912 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77904 invoked by uid 1010); 20 Sep 2004 05:32:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 77880 invoked by uid 1007); 20 Sep 2004 05:32:07 -0000 Message-ID: <20040920053207.77879.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: "l0t3k" Date: Mon, 20 Sep 2004 01:31:20 -0400 Lines: 16 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Posted-By: 68.211.55.247 Subject: Minor fix for pedantic compiler From: cshmoove@bellsouth.net ("l0t3k") 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 ---