]> granicus.if.org Git - php/commitdiff
fix some warnings.
authorWez Furlong <wez@php.net>
Mon, 23 Sep 2002 14:50:21 +0000 (14:50 +0000)
committerWez Furlong <wez@php.net>
Mon, 23 Sep 2002 14:50:21 +0000 (14:50 +0000)
ext/ftp/ftp.c
main/php_streams.h
main/streams.c

index 95a37b40df8988aee4273f105d18b9d4f778f62f..923cbf2f59b7d79665549c409f56ac19a11940bc 100644 (file)
@@ -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();
 
index 8044f05026b82a95e8d84f9b52fe70a9d50d758f..6c46ea6de1de17615150a35e0d6aeecae9388af2 100755 (executable)
@@ -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;
index 72259217052c7174c759f93f01168d2e336fd0ce..bcb210aa2d26fdb3d061f22999814c93d735e035 100755 (executable)
@@ -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;