summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2006-08-08 11:56:36 +0000
committerPierre Joye <pajoye@php.net>2006-08-08 11:56:36 +0000
commit6dbb90af212dc3c7baaae19f624006cc094aaa88 (patch)
treee4bda63682f91ef8b86a7df54c3cdf0da55ff73c
parent6277ba98d9d1fc8f41f6e32216a9b4cc0a47da34 (diff)
downloadphp-git-6dbb90af212dc3c7baaae19f624006cc094aaa88.tar.gz
- fix compiler warnings
-rw-r--r--ext/gd/gd.c10
-rw-r--r--ext/gd/libgd/gd_gd2.c4
2 files changed, 7 insertions, 7 deletions
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 {