From: Pierre Joye Date: Tue, 8 Aug 2006 11:56:36 +0000 (+0000) Subject: - fix compiler warnings X-Git-Tag: php-5.2.0RC2~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6dbb90af212dc3c7baaae19f624006cc094aaa88;p=php - fix compiler warnings --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 2994eb2c8b..33d3c312f8 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3677,7 +3677,7 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode) ch = (int)((unsigned char)*(Z_STRVAL_PP(C))); } else { str = (unsigned char *) estrndup(Z_STRVAL_PP(C), Z_STRLEN_PP(C)); - l = strlen(str); + l = strlen((char *)str); } y = Z_LVAL_PP(Y); @@ -4044,7 +4044,7 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int { char tmp_font_path[MAXPATHLEN]; - if (VCWD_REALPATH(fontname, tmp_font_path)) { + if (VCWD_REALPATH((char *)fontname, tmp_font_path)) { fontname = (unsigned char *) fontname; } else { fontname = NULL; @@ -4054,18 +4054,18 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int fontname = (unsigned char *) fontname; #endif - PHP_GD_CHECK_OPEN_BASEDIR(fontname, "Invalid font filename"); + PHP_GD_CHECK_OPEN_BASEDIR((char *)fontname, "Invalid font filename"); #ifdef USE_GD_IMGSTRTTF # if HAVE_GD_STRINGFTEX if (extended) { - error = gdImageStringFTEx(im, brect, col, fontname, ptsize, angle, x, y, str, &strex); + error = gdImageStringFTEx(im, brect, col, (char *)fontname, ptsize, angle, x, y, (char *)str, &strex); } else # endif # if HAVE_GD_STRINGFT - error = gdImageStringFT(im, brect, col, fontname, ptsize, angle, x, y, str); + error = gdImageStringFT(im, brect, col, (char *)fontname, ptsize, angle, x, y, (char *)str); # elif HAVE_GD_STRINGTTF error = gdImageStringTTF(im, brect, col, fontname, ptsize, angle, x, y, str); # endif diff --git a/ext/gd/libgd/gd_gd2.c b/ext/gd/libgd/gd_gd2.c index 3f24e4a476..efc6ef47af 100644 --- a/ext/gd/libgd/gd_gd2.c +++ b/ext/gd/libgd/gd_gd2.c @@ -544,7 +544,7 @@ gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w, chunkNum = cx + cy * ncx; chunkLen = chunkMax; - if (!_gd2ReadChunk (chunkIdx[chunkNum].offset, compBuf, chunkIdx[chunkNum].size, chunkBuf, &chunkLen, in)) { + if (!_gd2ReadChunk (chunkIdx[chunkNum].offset, compBuf, chunkIdx[chunkNum].size, (char *)chunkBuf, &chunkLen, in)) { php_gd_error("Error reading comproessed chunk"); goto fail2; } @@ -558,7 +558,7 @@ gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w, for (x = xlo; x < xhi; x++) { if (!gd2_compressed(fmt)) { if (im->trueColor) { - if (!gdGetInt(&ch, in)) { + if (!gdGetInt((int *)&ch, in)) { ch = 0; } } else {