summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/curl/interface.c10
-rw-r--r--ext/curl/streams.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 68e39794bd..ec79a2a697 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -967,10 +967,10 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
MAKE_STD_ZVAL(zultotal);
MAKE_STD_ZVAL(zulnow);
- ZVAL_LONG(zdltotal, dltotal);
- ZVAL_LONG(zdlnow, dlnow);
- ZVAL_LONG(zultotal, ultotal);
- ZVAL_LONG(zulnow, ulnow);
+ ZVAL_LONG(zdltotal, (long) dltotal);
+ ZVAL_LONG(zdlnow, (long) dlnow);
+ ZVAL_LONG(zultotal, (long) ultotal);
+ ZVAL_LONG(zulnow, (long) ulnow);
argv[0] = &zdltotal;
argv[1] = &zdlnow;
@@ -1071,7 +1071,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
#endif
} else if (retval_ptr) {
if (Z_TYPE_P(retval_ptr) == IS_STRING) {
- length = MIN(size * nmemb, Z_STRLEN_P(retval_ptr));
+ length = MIN((int) (size * nmemb), Z_STRLEN_P(retval_ptr));
memcpy(data, Z_STRVAL_P(retval_ptr), length);
}
zval_ptr_dtor(&retval_ptr);
diff --git a/ext/curl/streams.c b/ext/curl/streams.c
index 5b21e7fd7f..05e00fcc4d 100644
--- a/ext/curl/streams.c
+++ b/ext/curl/streams.c
@@ -132,7 +132,7 @@ static int on_progress_avail(php_stream *stream, double dltotal, double dlnow, d
/* our notification system only works in a single direction; we should detect which
* direction is important and use the correct values in this call */
- php_stream_notify_progress(stream->context, dlnow, dltotal);
+ php_stream_notify_progress(stream->context, (size_t) dlnow, (size_t) dltotal);
return 0;
}