From: Wez Furlong Date: Mon, 23 Sep 2002 14:50:21 +0000 (+0000) Subject: fix some warnings. X-Git-Tag: MODERN_SYMMETRIC_SESSION_BEHAVIOUR_20021003~232 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad4afdf827f01be904450c77e144bf6ba910fbc0;p=php fix some warnings. --- diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 95a37b40df..923cbf2f59 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -571,7 +571,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, databuf_t *data = NULL; char *ptr; int lastch; - int rcvd; + size_t rcvd; char arg[11]; TSRMLS_FETCH(); @@ -1443,7 +1443,7 @@ ftp_async_continue_read(ftpbuf_t *ftp) databuf_t *data = NULL; char *ptr; int lastch; - int rcvd; + size_t rcvd; ftptype_t type; TSRMLS_FETCH(); diff --git a/main/php_streams.h b/main/php_streams.h index 8044f05026..6c46ea6de1 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -255,8 +255,8 @@ struct _php_stream { off_t position; /* of underlying stream */ unsigned char *readbuf; size_t readbuflen; - size_t readpos; - size_t writepos; + off_t readpos; + off_t writepos; /* how much data to read when filling buffer */ size_t chunk_size; diff --git a/main/streams.c b/main/streams.c index 7225921705..bcb210aa2d 100755 --- a/main/streams.c +++ b/main/streams.c @@ -512,7 +512,7 @@ PHPAPI char *_php_stream_gets(php_stream *stream, char *buf, size_t maxlen TSRML eol = memchr(readptr, '\n', avail); } - if (eol && (eol + 1 - readptr) <= maxlen - 1) { + if (eol && ((ptrdiff_t)eol + 1 - (ptrdiff_t)readptr) <= maxlen - 1) { justread = eol + 1 - readptr; } else { eol = NULL;