From: Christoph M. Becker Date: Tue, 20 Oct 2020 14:25:00 +0000 (+0200) Subject: Add char* cast to avoid compiler warnings X-Git-Tag: php-7.3.25RC1~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de58fb34c9dad0ce598eb53ee942628fd7c7b14a;p=php Add char* cast to avoid compiler warnings In libc-client 2007f `data` is declared as `unsigned char *`; there may be variants which declare it as `void *`, but in any case picky compilers may warn about a pointer type mismatch in the conditional (and error with `-W-error`), so we're adding a `char *` cast for good measure. --- diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 084cb4ee28..7d0fca1e98 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3937,7 +3937,7 @@ PHP_FUNCTION(imap_mail_compose) efree(mystring); mystring=tempstring; } else if (bod) { - spprintf(&tempstring, 0, "%s%s%s", mystring, bod->contents.text.data ? bod->contents.text.data : "", CRLF); + spprintf(&tempstring, 0, "%s%s%s", mystring, bod->contents.text.data ? (char *) bod->contents.text.data : "", CRLF); efree(mystring); mystring=tempstring; } else {