@@ -1453,11 +1453,11 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
1453
1453
/* }}} */
1454
1454
1455
1455
/* {{{ curl_progress */
1456
- static size_t curl_progress (void * clientp , double dltotal , double dlnow , double ultotal , double ulnow )
1456
+ static int curl_progress (void * clientp , double dltotal , double dlnow , double ultotal , double ulnow )
1457
1457
{
1458
1458
php_curl * ch = (php_curl * )clientp ;
1459
1459
php_curl_callback * t = ch -> handlers .progress ;
1460
- size_t rval = 0 ;
1460
+ int rval = 0 ;
1461
1461
1462
1462
#if PHP_CURL_DEBUG
1463
1463
fprintf (stderr , "curl_progress() called\n" );
@@ -1818,8 +1818,8 @@ static void _php_curl_set_default_options(php_curl *ch)
1818
1818
{
1819
1819
char * cainfo ;
1820
1820
1821
- curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS , 1 );
1822
- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
1821
+ curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS , 1L );
1822
+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
1823
1823
curl_easy_setopt (ch -> cp , CURLOPT_ERRORBUFFER , ch -> err .str );
1824
1824
curl_easy_setopt (ch -> cp , CURLOPT_WRITEFUNCTION , curl_write );
1825
1825
curl_easy_setopt (ch -> cp , CURLOPT_FILE , (void * ) ch );
@@ -1828,10 +1828,10 @@ static void _php_curl_set_default_options(php_curl *ch)
1828
1828
curl_easy_setopt (ch -> cp , CURLOPT_HEADERFUNCTION , curl_write_header );
1829
1829
curl_easy_setopt (ch -> cp , CURLOPT_WRITEHEADER , (void * ) ch );
1830
1830
#ifndef ZTS
1831
- curl_easy_setopt (ch -> cp , CURLOPT_DNS_USE_GLOBAL_CACHE , 1 );
1831
+ curl_easy_setopt (ch -> cp , CURLOPT_DNS_USE_GLOBAL_CACHE , 1L );
1832
1832
#endif
1833
- curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120 );
1834
- curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20 ); /* prevent infinite redirects */
1833
+ curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120L );
1834
+ curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20L ); /* prevent infinite redirects */
1835
1835
1836
1836
cainfo = INI_STR ("openssl.cafile" );
1837
1837
if (!(cainfo && cainfo [0 ] != '\0' )) {
@@ -2807,7 +2807,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
2807
2807
/* no need to build the mime structure for empty hashtables;
2808
2808
also works around https://github.com/curl/curl/issues/6455 */
2809
2809
curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDS , "" );
2810
- error = curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0 );
2810
+ error = curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0L );
2811
2811
} else {
2812
2812
return build_mime_structure_from_hash (ch , zvalue );
2813
2813
}
@@ -2871,7 +2871,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
2871
2871
2872
2872
case CURLOPT_POSTREDIR :
2873
2873
lval = zval_get_long (zvalue );
2874
- error = curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , lval & CURL_REDIR_POST_ALL );
2874
+ error = curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , ( long ) ( lval & CURL_REDIR_POST_ALL ) );
2875
2875
break ;
2876
2876
2877
2877
/* the following options deal with files, therefore the open_basedir check
@@ -2906,11 +2906,11 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
2906
2906
if (zend_is_true (zvalue )) {
2907
2907
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , curl_debug );
2908
2908
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , (void * )ch );
2909
- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1 );
2909
+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1L );
2910
2910
} else {
2911
2911
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , NULL );
2912
2912
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , NULL );
2913
- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
2913
+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
2914
2914
}
2915
2915
break ;
2916
2916
0 commit comments