From: Nikita Popov Date: Fri, 17 Jul 2015 17:48:06 +0000 (+0200) Subject: Fix zlib_filter warnings X-Git-Tag: php-7.0.0beta2~6^2~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90d9adccec42559d08487ae144e947df30ab820e;p=php Fix zlib_filter warnings --- diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index c0705f8b31..b1e5a54300 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -26,9 +26,9 @@ /* Passed as opaque in malloc callbacks */ typedef struct _php_zlib_filter_data { z_stream strm; - char *inbuf; + unsigned char *inbuf; size_t inbuf_len; - char *outbuf; + unsigned char *outbuf; size_t outbuf_len; int persistent; zend_bool finished; @@ -112,7 +112,8 @@ static php_stream_filter_status_t php_zlib_inflate_filter( if (data->strm.avail_out < data->outbuf_len) { php_stream_bucket *out_bucket; size_t bucketlen = data->outbuf_len - data->strm.avail_out; - out_bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0); + out_bucket = php_stream_bucket_new( + stream, estrndup((char *) data->outbuf, bucketlen), bucketlen, 1, 0); php_stream_bucket_append(buckets_out, out_bucket); data->strm.avail_out = data->outbuf_len; data->strm.next_out = data->outbuf; @@ -136,7 +137,8 @@ static php_stream_filter_status_t php_zlib_inflate_filter( if (data->strm.avail_out < data->outbuf_len) { size_t bucketlen = data->outbuf_len - data->strm.avail_out; - bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0); + bucket = php_stream_bucket_new( + stream, estrndup((char *) data->outbuf, bucketlen), bucketlen, 1, 0); php_stream_bucket_append(buckets_out, bucket); data->strm.avail_out = data->outbuf_len; data->strm.next_out = data->outbuf; @@ -226,7 +228,8 @@ static php_stream_filter_status_t php_zlib_deflate_filter( php_stream_bucket *out_bucket; size_t bucketlen = data->outbuf_len - data->strm.avail_out; - out_bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0); + out_bucket = php_stream_bucket_new( + stream, estrndup((char *) data->outbuf, bucketlen), bucketlen, 1, 0); php_stream_bucket_append(buckets_out, out_bucket); data->strm.avail_out = data->outbuf_len; data->strm.next_out = data->outbuf; @@ -245,7 +248,8 @@ static php_stream_filter_status_t php_zlib_deflate_filter( if (data->strm.avail_out < data->outbuf_len) { size_t bucketlen = data->outbuf_len - data->strm.avail_out; - bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0); + bucket = php_stream_bucket_new( + stream, estrndup((char *) data->outbuf, bucketlen), bucketlen, 1, 0); php_stream_bucket_append(buckets_out, bucket); data->strm.avail_out = data->outbuf_len; data->strm.next_out = data->outbuf;