From de58fb34c9dad0ce598eb53ee942628fd7c7b14a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 20 Oct 2020 16:25:00 +0200 Subject: [PATCH] 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. --- ext/imap/php_imap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.50.1