@@ -643,10 +643,10 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
643643/* }}} */
644644
645645/* {{{ curl_progress */
646- static size_t curl_progress (void * clientp , double dltotal , double dlnow , double ultotal , double ulnow )
646+ static int curl_progress (void * clientp , double dltotal , double dlnow , double ultotal , double ulnow )
647647{
648648 php_curl * ch = (php_curl * )clientp ;
649- size_t rval = 0 ;
649+ int rval = 0 ;
650650
651651#if PHP_CURL_DEBUG
652652 fprintf (stderr , "curl_progress() called\n" );
@@ -681,10 +681,10 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
681681/* }}} */
682682
683683/* {{{ curl_xferinfo */
684- static size_t curl_xferinfo (void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow )
684+ static int curl_xferinfo (void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow )
685685{
686686 php_curl * ch = (php_curl * )clientp ;
687- size_t rval = 0 ;
687+ int rval = 0 ;
688688
689689#if PHP_CURL_DEBUG
690690 fprintf (stderr , "curl_xferinfo() called\n" );
@@ -1190,17 +1190,17 @@ static void _php_curl_set_default_options(php_curl *ch)
11901190{
11911191 char * cainfo ;
11921192
1193- curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS , 1 );
1194- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
1193+ curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS , 1L );
1194+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
11951195 curl_easy_setopt (ch -> cp , CURLOPT_ERRORBUFFER , ch -> err .str );
11961196 curl_easy_setopt (ch -> cp , CURLOPT_WRITEFUNCTION , curl_write );
11971197 curl_easy_setopt (ch -> cp , CURLOPT_FILE , (void * ) ch );
11981198 curl_easy_setopt (ch -> cp , CURLOPT_READFUNCTION , curl_read );
11991199 curl_easy_setopt (ch -> cp , CURLOPT_INFILE , (void * ) ch );
12001200 curl_easy_setopt (ch -> cp , CURLOPT_HEADERFUNCTION , curl_write_header );
12011201 curl_easy_setopt (ch -> cp , CURLOPT_WRITEHEADER , (void * ) ch );
1202- curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120 );
1203- curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20 ); /* prevent infinite redirects */
1202+ curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120L );
1203+ curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20L ); /* prevent infinite redirects */
12041204
12051205 cainfo = INI_STR ("openssl.cafile" );
12061206 if (!(cainfo && cainfo [0 ] != '\0' )) {
@@ -2216,7 +2216,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
22162216 /* no need to build the mime structure for empty hashtables;
22172217 also works around https://github.com/curl/curl/issues/6455 */
22182218 curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDS , "" );
2219- error = curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0 );
2219+ error = curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0L );
22202220 } else {
22212221 return build_mime_structure_from_hash (ch , zvalue );
22222222 }
@@ -2249,7 +2249,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
22492249
22502250 case CURLOPT_POSTREDIR :
22512251 lval = zval_get_long (zvalue );
2252- error = curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , lval & CURL_REDIR_POST_ALL );
2252+ error = curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , ( long ) ( lval & CURL_REDIR_POST_ALL ) );
22532253 break ;
22542254
22552255 /* the following options deal with files, therefore the open_basedir check
@@ -2289,11 +2289,11 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
22892289 if (zend_is_true (zvalue )) {
22902290 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , curl_debug );
22912291 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , (void * )ch );
2292- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1 );
2292+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1L );
22932293 } else {
22942294 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , NULL );
22952295 curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , NULL );
2296- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
2296+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
22972297 }
22982298 break ;
22992299
0 commit comments