diff options
Diffstat (limited to 'main/rfc1867.c')
-rw-r--r-- | main/rfc1867.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/rfc1867.c b/main/rfc1867.c index afd982cca8..6aa6b5d626 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -620,7 +620,7 @@ static int multipart_buffer_read(multipart_buffer *self, char *buf, size_t bytes char *bound; /* fill buffer if needed */ - if (bytes > self->bytes_in_buffer) { + if (bytes > (size_t)self->bytes_in_buffer) { fill_buffer(self); } @@ -1048,7 +1048,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ cancel_upload = UPLOAD_ERROR_A; } else if (max_file_size && ((zend_long)(total_bytes+blen) > max_file_size)) { #if DEBUG_FILE_UPLOAD - sapi_module.sapi_error(E_NOTICE, "MAX_FILE_SIZE of " ZEND_LONG_FMT " bytes exceeded - file [%s=%s] not saved", max_file_size, param, filename); + sapi_module.sapi_error(E_NOTICE, "MAX_FILE_SIZE of %" PRId64 " bytes exceeded - file [%s=%s] not saved", max_file_size, param, filename); #endif cancel_upload = UPLOAD_ERROR_B; } else if (blen > 0) { @@ -1058,7 +1058,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ wlen = write(fd, buff, blen); #endif - if (wlen == -1) { + if (wlen == (size_t)-1) { /* write failed */ #if DEBUG_FILE_UPLOAD sapi_module.sapi_error(E_NOTICE, "write() failed - %s", strerror(errno)); @@ -1066,7 +1066,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ cancel_upload = UPLOAD_ERROR_F; } else if (wlen < blen) { #if DEBUG_FILE_UPLOAD - sapi_module.sapi_error(E_NOTICE, "Only %d bytes were written, expected to write %d", wlen, blen); + sapi_module.sapi_error(E_NOTICE, "Only %zd bytes were written, expected to write %zd", wlen, blen); #endif cancel_upload = UPLOAD_ERROR_F; } else { @@ -1257,7 +1257,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ } #else { - int __len = snprintf(file_size_buf, 65, "%lld", total_bytes); + int __len = snprintf(file_size_buf, 65, "%" PRId64, total_bytes); file_size_buf[__len] = '\0'; } #endif |