summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2003-09-26 08:09:56 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2003-09-26 08:09:56 +0000
commit075e66cc086255ea8a4b2d9583e0a5970918d3e1 (patch)
tree58daa25a951229913a2162a02d4012d9c9f97c1e /ext/zlib
parent0a46866d8f7683d637433252147459feba307670 (diff)
downloadphp-git-075e66cc086255ea8a4b2d9583e0a5970918d3e1.tar.gz
signed/unsigned compiler warning fixes
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/zlib.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index d3ca9dadcb..05e17ee620 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -410,7 +410,8 @@ PHP_FUNCTION(gzcompress)
Unzip a gzip-compressed string */
PHP_FUNCTION(gzuncompress)
{
- int data_len, status, factor=1, maxfactor=16;
+ int data_len, status;
+ unsigned int factor=1, maxfactor=16;
long limit = 0;
unsigned long plength=0, length;
char *data, *s1=NULL, *s2=NULL;
@@ -433,7 +434,7 @@ PHP_FUNCTION(gzuncompress)
that should be eneugh for all real life cases
*/
do {
- length = plength ? plength : data_len * (1 << factor++);
+ length = plength ? plength : (unsigned long)data_len * (1 << factor++);
s2 = (char *) erealloc(s1, length);
status = uncompress(s2, &length, data, data_len);
s1 = s2;
@@ -516,7 +517,8 @@ PHP_FUNCTION(gzdeflate)
Unzip a gzip-compressed string */
PHP_FUNCTION(gzinflate)
{
- int data_len, status, factor=1, maxfactor=16;
+ int data_len, status;
+ unsigned int factor=1, maxfactor=16;
long limit = 0;
unsigned long plength=0, length;
char *data, *s1=NULL, *s2=NULL;
@@ -544,7 +546,7 @@ PHP_FUNCTION(gzinflate)
stream.zfree = (free_func) Z_NULL;
do {
- length = plength ? plength : data_len * (1 << factor++);
+ length = plength ? plength : (unsigned long)data_len * (1 << factor++);
s2 = (char *) erealloc(s1, length);
if (!s2 && s1) {