@@ -667,11 +667,11 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
667
667
/* }}} */
668
668
669
669
/* {{{ 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 )
671
671
{
672
672
php_curl * ch = (php_curl * )clientp ;
673
673
php_curl_callback * t = ch -> handlers .progress ;
674
- size_t rval = 0 ;
674
+ int rval = 0 ;
675
675
676
676
#if PHP_CURL_DEBUG
677
677
fprintf (stderr , "curl_progress() called\n" );
@@ -1085,8 +1085,8 @@ static void _php_curl_set_default_options(php_curl *ch)
1085
1085
{
1086
1086
char * cainfo ;
1087
1087
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 );
1090
1090
curl_easy_setopt (ch -> cp , CURLOPT_ERRORBUFFER , ch -> err .str );
1091
1091
curl_easy_setopt (ch -> cp , CURLOPT_WRITEFUNCTION , curl_write );
1092
1092
curl_easy_setopt (ch -> cp , CURLOPT_FILE , (void * ) ch );
@@ -1095,10 +1095,10 @@ static void _php_curl_set_default_options(php_curl *ch)
1095
1095
curl_easy_setopt (ch -> cp , CURLOPT_HEADERFUNCTION , curl_write_header );
1096
1096
curl_easy_setopt (ch -> cp , CURLOPT_WRITEHEADER , (void * ) ch );
1097
1097
#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 );
1099
1099
#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 */
1102
1102
1103
1103
cainfo = INI_STR ("openssl.cafile" );
1104
1104
if (!(cainfo && cainfo [0 ] != '\0' )) {
@@ -1109,7 +1109,7 @@ static void _php_curl_set_default_options(php_curl *ch)
1109
1109
}
1110
1110
1111
1111
#ifdef ZTS
1112
- curl_easy_setopt (ch -> cp , CURLOPT_NOSIGNAL , 1 );
1112
+ curl_easy_setopt (ch -> cp , CURLOPT_NOSIGNAL , 1L );
1113
1113
#endif
1114
1114
}
1115
1115
/* }}} */
@@ -1616,7 +1616,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
1616
1616
lval = zval_get_long (zvalue );
1617
1617
if (lval == 1 ) {
1618
1618
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 );
1620
1620
break ;
1621
1621
}
1622
1622
ZEND_FALLTHROUGH ;
@@ -2158,7 +2158,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
2158
2158
2159
2159
case CURLOPT_FOLLOWLOCATION :
2160
2160
lval = zend_is_true (zvalue );
2161
- error = curl_easy_setopt (ch -> cp , option , lval );
2161
+ error = curl_easy_setopt (ch -> cp , option , ( long ) lval );
2162
2162
break ;
2163
2163
2164
2164
case CURLOPT_HEADERFUNCTION :
@@ -2176,7 +2176,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
2176
2176
/* no need to build the mime structure for empty hashtables;
2177
2177
also works around https://github.com/curl/curl/issues/6455 */
2178
2178
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 );
2180
2180
} else {
2181
2181
return build_mime_structure_from_hash (ch , zvalue );
2182
2182
}
@@ -2255,7 +2255,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
2255
2255
2256
2256
case CURLOPT_POSTREDIR :
2257
2257
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 ) );
2259
2259
break ;
2260
2260
2261
2261
/* 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
2290
2290
if (zend_is_true (zvalue )) {
2291
2291
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , curl_debug );
2292
2292
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 );
2294
2294
} else {
2295
2295
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , NULL );
2296
2296
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 );
2298
2298
}
2299
2299
break ;
2300
2300
0 commit comments