@@ -1453,11 +1453,11 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
14531453/* }}} */
14541454
14551455/* {{{ 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 )
14571457{
14581458 php_curl * ch = (php_curl * )clientp ;
14591459 php_curl_callback * t = ch -> handlers .progress ;
1460- size_t rval = 0 ;
1460+ int rval = 0 ;
14611461
14621462#if PHP_CURL_DEBUG
14631463 fprintf (stderr , "curl_progress() called\n" );
@@ -1818,8 +1818,8 @@ static void _php_curl_set_default_options(php_curl *ch)
18181818{
18191819 char * cainfo ;
18201820
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 );
18231823 curl_easy_setopt (ch -> cp , CURLOPT_ERRORBUFFER , ch -> err .str );
18241824 curl_easy_setopt (ch -> cp , CURLOPT_WRITEFUNCTION , curl_write );
18251825 curl_easy_setopt (ch -> cp , CURLOPT_FILE , (void * ) ch );
@@ -1828,10 +1828,10 @@ static void _php_curl_set_default_options(php_curl *ch)
18281828 curl_easy_setopt (ch -> cp , CURLOPT_HEADERFUNCTION , curl_write_header );
18291829 curl_easy_setopt (ch -> cp , CURLOPT_WRITEHEADER , (void * ) ch );
18301830#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 );
18321832#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 */
18351835
18361836 cainfo = INI_STR ("openssl.cafile" );
18371837 if (!(cainfo && cainfo [0 ] != '\0' )) {
@@ -2807,7 +2807,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
28072807 /* no need to build the mime structure for empty hashtables;
28082808 also works around https://github.com/curl/curl/issues/6455 */
28092809 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 );
28112811 } else {
28122812 return build_mime_structure_from_hash (ch , zvalue );
28132813 }
@@ -2871,7 +2871,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
28712871
28722872 case CURLOPT_POSTREDIR :
28732873 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 ) );
28752875 break ;
28762876
28772877 /* 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
29062906 if (zend_is_true (zvalue )) {
29072907 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , curl_debug );
29082908 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 );
29102910 } else {
29112911 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , NULL );
29122912 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 );
29142914 }
29152915 break ;
29162916
0 commit comments