@@ -667,11 +667,11 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
667667/* }}} */
668668
669669/* {{{ curl_progress */
670- static size_t curl_progress (void * clientp , double dltotal , double dlnow , double ultotal , double ulnow )
670+ static int curl_progress (void * clientp , double dltotal , double dlnow , double ultotal , double ulnow )
671671{
672672 php_curl * ch = (php_curl * )clientp ;
673673 php_curl_callback * t = ch -> handlers .progress ;
674- size_t rval = 0 ;
674+ int rval = 0 ;
675675
676676#if PHP_CURL_DEBUG
677677 fprintf (stderr , "curl_progress() called\n" );
@@ -1085,8 +1085,8 @@ static void _php_curl_set_default_options(php_curl *ch)
10851085{
10861086 char * cainfo ;
10871087
1088- curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS , 1 );
1089- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
1088+ curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS , 1L );
1089+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
10901090 curl_easy_setopt (ch -> cp , CURLOPT_ERRORBUFFER , ch -> err .str );
10911091 curl_easy_setopt (ch -> cp , CURLOPT_WRITEFUNCTION , curl_write );
10921092 curl_easy_setopt (ch -> cp , CURLOPT_FILE , (void * ) ch );
@@ -1095,10 +1095,10 @@ static void _php_curl_set_default_options(php_curl *ch)
10951095 curl_easy_setopt (ch -> cp , CURLOPT_HEADERFUNCTION , curl_write_header );
10961096 curl_easy_setopt (ch -> cp , CURLOPT_WRITEHEADER , (void * ) ch );
10971097#ifndef ZTS
1098- curl_easy_setopt (ch -> cp , CURLOPT_DNS_USE_GLOBAL_CACHE , 1 );
1098+ curl_easy_setopt (ch -> cp , CURLOPT_DNS_USE_GLOBAL_CACHE , 1L );
10991099#endif
1100- curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120 );
1101- curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20 ); /* prevent infinite redirects */
1100+ curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120L );
1101+ curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20L ); /* prevent infinite redirects */
11021102
11031103 cainfo = INI_STR ("openssl.cafile" );
11041104 if (!(cainfo && cainfo [0 ] != '\0' )) {
@@ -1109,7 +1109,7 @@ static void _php_curl_set_default_options(php_curl *ch)
11091109 }
11101110
11111111#ifdef ZTS
1112- curl_easy_setopt (ch -> cp , CURLOPT_NOSIGNAL , 1 );
1112+ curl_easy_setopt (ch -> cp , CURLOPT_NOSIGNAL , 1L );
11131113#endif
11141114}
11151115/* }}} */
@@ -1616,7 +1616,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
16161616 lval = zval_get_long (zvalue );
16171617 if (lval == 1 ) {
16181618 php_error_docref (NULL , E_NOTICE , "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead" );
1619- error = curl_easy_setopt (ch -> cp , option , 2 );
1619+ error = curl_easy_setopt (ch -> cp , option , 2L );
16201620 break ;
16211621 }
16221622 ZEND_FALLTHROUGH ;
@@ -2158,7 +2158,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
21582158
21592159 case CURLOPT_FOLLOWLOCATION :
21602160 lval = zend_is_true (zvalue );
2161- error = curl_easy_setopt (ch -> cp , option , lval );
2161+ error = curl_easy_setopt (ch -> cp , option , ( long ) lval );
21622162 break ;
21632163
21642164 case CURLOPT_HEADERFUNCTION :
@@ -2176,7 +2176,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
21762176 /* no need to build the mime structure for empty hashtables;
21772177 also works around https://github.com/curl/curl/issues/6455 */
21782178 curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDS , "" );
2179- error = curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0 );
2179+ error = curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0L );
21802180 } else {
21812181 return build_mime_structure_from_hash (ch , zvalue );
21822182 }
@@ -2255,7 +2255,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
22552255
22562256 case CURLOPT_POSTREDIR :
22572257 lval = zval_get_long (zvalue );
2258- error = curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , lval & CURL_REDIR_POST_ALL );
2258+ error = curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , ( long ) ( lval & CURL_REDIR_POST_ALL ) );
22592259 break ;
22602260
22612261 /* the following options deal with files, therefore the open_basedir check
@@ -2290,11 +2290,11 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
22902290 if (zend_is_true (zvalue )) {
22912291 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , curl_debug );
22922292 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , (void * )ch );
2293- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1 );
2293+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1L );
22942294 } else {
22952295 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , NULL );
22962296 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , NULL );
2297- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
2297+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
22982298 }
22992299 break ;
23002300
0 commit comments