summaryrefslogtreecommitdiff
path: root/ext/standard/image.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-07-17 20:48:42 +0200
committerNikita Popov <nikic@php.net>2015-07-17 21:12:15 +0200
commit42e32c33e23a0f139e5c589acbcc580db2613c84 (patch)
tree09d59e02fa2f951f12b606975c08a3fcd5b1b4be /ext/standard/image.c
parent36e49c702bee0b4bbce6703608e527a2f7e1f629 (diff)
downloadphp-git-42e32c33e23a0f139e5c589acbcc580db2613c84.tar.gz
More warning fixes
Diffstat (limited to 'ext/standard/image.c')
-rw-r--r--ext/standard/image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 0ea3abace2..edb0d50ea3 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -204,7 +204,7 @@ static struct gfxinfo *php_handle_swc(php_stream * stream)
unsigned long len=64, szlength;
int factor = 1,maxfactor = 16;
int status = 0;
- char *b, *buf = NULL;
+ unsigned char *b, *buf = NULL;
zend_string *bufz;
b = ecalloc(1, len + 1);
@@ -212,7 +212,7 @@ static struct gfxinfo *php_handle_swc(php_stream * stream)
if (php_stream_seek(stream, 5, SEEK_CUR))
return NULL;
- if (php_stream_read(stream, a, sizeof(a)) != sizeof(a))
+ if (php_stream_read(stream, (char *) a, sizeof(a)) != sizeof(a))
return NULL;
if (uncompress(b, &len, a, sizeof(a)) != Z_OK) {
@@ -232,8 +232,8 @@ static struct gfxinfo *php_handle_swc(php_stream * stream)
do {
szlength = ZSTR_LEN(bufz) * (1<<factor++);
- buf = (char *) erealloc(buf, szlength);
- status = uncompress(buf, &szlength, ZSTR_VAL(bufz), ZSTR_LEN(bufz));
+ buf = erealloc(buf, szlength);
+ status = uncompress(buf, &szlength, (unsigned char *) ZSTR_VAL(bufz), ZSTR_LEN(bufz));
} while ((status==Z_BUF_ERROR)&&(factor<maxfactor));
if (bufz) {