]> granicus.if.org Git - php/commitdiff
Add char* cast to avoid compiler warnings
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 20 Oct 2020 14:25:00 +0000 (16:25 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 20 Oct 2020 14:29:42 +0000 (16:29 +0200)
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

index 084cb4ee28656396c8907f9a74d8fbae2c7fae00..7d0fca1e9861f8c75675e2697693447452ecf042 100644 (file)
@@ -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 {