summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-09-23 14:50:21 +0000
committerWez Furlong <wez@php.net>2002-09-23 14:50:21 +0000
commitad4afdf827f01be904450c77e144bf6ba910fbc0 (patch)
treeb013c34c62eaa6ea7fa38ab406e0a54541388a26
parentfd329d2cd1154d170ee61476be6c8a1d3c48fbb6 (diff)
downloadphp-git-ad4afdf827f01be904450c77e144bf6ba910fbc0.tar.gz
fix some warnings.
-rw-r--r--ext/ftp/ftp.c4
-rwxr-xr-xmain/php_streams.h4
-rwxr-xr-xmain/streams.c2
3 files changed, 5 insertions, 5 deletions
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;