@@ -744,7 +744,7 @@ static int has_proxy_cert_password(void)
744
744
#ifdef GITCURL_HAVE_CURLOPT_TCP_KEEPALIVE
745
745
static void set_curl_keepalive (CURL * c )
746
746
{
747
- curl_easy_setopt (c , CURLOPT_TCP_KEEPALIVE , 1 );
747
+ curl_easy_setopt (c , CURLOPT_TCP_KEEPALIVE , 1L );
748
748
}
749
749
750
750
#else
@@ -1071,13 +1071,13 @@ static CURL *get_curl_handle(void)
1071
1071
die ("curl_easy_init failed" );
1072
1072
1073
1073
if (!curl_ssl_verify ) {
1074
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 0 );
1075
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 0 );
1074
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 0L );
1075
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 0L );
1076
1076
} else {
1077
1077
/* Verify authenticity of the peer's certificate */
1078
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 1 );
1078
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 1L );
1079
1079
/* The name in the cert must match whom we tried to connect */
1080
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 2 );
1080
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 2L );
1081
1081
}
1082
1082
1083
1083
#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2
@@ -1192,8 +1192,8 @@ static CURL *get_curl_handle(void)
1192
1192
curl_low_speed_time );
1193
1193
}
1194
1194
1195
- curl_easy_setopt (result , CURLOPT_MAXREDIRS , 20 );
1196
- curl_easy_setopt (result , CURLOPT_POSTREDIR , CURL_REDIR_POST_ALL );
1195
+ curl_easy_setopt (result , CURLOPT_MAXREDIRS , 20L );
1196
+ curl_easy_setopt (result , CURLOPT_POSTREDIR , ( long ) CURL_REDIR_POST_ALL );
1197
1197
1198
1198
#ifdef GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR
1199
1199
{
@@ -1226,7 +1226,7 @@ static CURL *get_curl_handle(void)
1226
1226
user_agent ? user_agent : git_user_agent ());
1227
1227
1228
1228
if (curl_ftp_no_epsv )
1229
- curl_easy_setopt (result , CURLOPT_FTP_USE_EPSV , 0 );
1229
+ curl_easy_setopt (result , CURLOPT_FTP_USE_EPSV , 0L );
1230
1230
1231
1231
if (curl_ssl_try )
1232
1232
curl_easy_setopt (result , CURLOPT_USE_SSL , CURLUSESSL_TRY );
@@ -1268,19 +1268,19 @@ static CURL *get_curl_handle(void)
1268
1268
1269
1269
if (starts_with (curl_http_proxy , "socks5h" ))
1270
1270
curl_easy_setopt (result ,
1271
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS5_HOSTNAME );
1271
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS5_HOSTNAME );
1272
1272
else if (starts_with (curl_http_proxy , "socks5" ))
1273
1273
curl_easy_setopt (result ,
1274
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS5 );
1274
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS5 );
1275
1275
else if (starts_with (curl_http_proxy , "socks4a" ))
1276
1276
curl_easy_setopt (result ,
1277
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS4A );
1277
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS4A );
1278
1278
else if (starts_with (curl_http_proxy , "socks" ))
1279
1279
curl_easy_setopt (result ,
1280
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS4 );
1280
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS4 );
1281
1281
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD
1282
1282
else if (starts_with (curl_http_proxy , "https ")) {
1283
- curl_easy_setopt (result , CURLOPT_PROXYTYPE , CURLPROXY_HTTPS );
1283
+ curl_easy_setopt (result , CURLOPT_PROXYTYPE , ( long ) CURLPROXY_HTTPS );
1284
1284
1285
1285
if (http_proxy_ssl_cert )
1286
1286
curl_easy_setopt (result , CURLOPT_PROXY_SSLCERT , http_proxy_ssl_cert );
@@ -1588,9 +1588,9 @@ struct active_request_slot *get_active_slot(void)
1588
1588
curl_easy_setopt (slot -> curl , CURLOPT_WRITEFUNCTION , NULL );
1589
1589
curl_easy_setopt (slot -> curl , CURLOPT_POSTFIELDS , NULL );
1590
1590
curl_easy_setopt (slot -> curl , CURLOPT_POSTFIELDSIZE , -1L );
1591
- curl_easy_setopt (slot -> curl , CURLOPT_UPLOAD , 0 );
1592
- curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1 );
1593
- curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 1 );
1591
+ curl_easy_setopt (slot -> curl , CURLOPT_UPLOAD , 0L );
1592
+ curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1L );
1593
+ curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 1L );
1594
1594
curl_easy_setopt (slot -> curl , CURLOPT_RANGE , NULL );
1595
1595
1596
1596
/*
@@ -1599,9 +1599,9 @@ struct active_request_slot *get_active_slot(void)
1599
1599
* HTTP_FOLLOW_* cases themselves.
1600
1600
*/
1601
1601
if (http_follow_config == HTTP_FOLLOW_ALWAYS )
1602
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1 );
1602
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1L );
1603
1603
else
1604
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 0 );
1604
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 0L );
1605
1605
1606
1606
curl_easy_setopt (slot -> curl , CURLOPT_IPRESOLVE , git_curl_ipresolve );
1607
1607
curl_easy_setopt (slot -> curl , CURLOPT_HTTPAUTH , http_auth_methods );
@@ -2170,12 +2170,12 @@ static int http_request(const char *url,
2170
2170
int ret ;
2171
2171
2172
2172
slot = get_active_slot ();
2173
- curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1 );
2173
+ curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1L );
2174
2174
2175
2175
if (!result ) {
2176
- curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 1 );
2176
+ curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 1L );
2177
2177
} else {
2178
- curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0 );
2178
+ curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0L );
2179
2179
curl_easy_setopt (slot -> curl , CURLOPT_WRITEDATA , result );
2180
2180
2181
2181
if (target == HTTP_REQUEST_FILE ) {
@@ -2201,7 +2201,7 @@ static int http_request(const char *url,
2201
2201
strbuf_addstr (& buf , " no-cache" );
2202
2202
if (options && options -> initial_request &&
2203
2203
http_follow_config == HTTP_FOLLOW_INITIAL )
2204
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1 );
2204
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1L );
2205
2205
2206
2206
headers = curl_slist_append (headers , buf .buf );
2207
2207
@@ -2220,7 +2220,7 @@ static int http_request(const char *url,
2220
2220
curl_easy_setopt (slot -> curl , CURLOPT_URL , url );
2221
2221
curl_easy_setopt (slot -> curl , CURLOPT_HTTPHEADER , headers );
2222
2222
curl_easy_setopt (slot -> curl , CURLOPT_ENCODING , "" );
2223
- curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 0 );
2223
+ curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 0L );
2224
2224
2225
2225
ret = run_one_slot (slot , & results );
2226
2226
@@ -2782,7 +2782,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
2782
2782
freq -> headers = object_request_headers ();
2783
2783
2784
2784
curl_easy_setopt (freq -> slot -> curl , CURLOPT_WRITEDATA , freq );
2785
- curl_easy_setopt (freq -> slot -> curl , CURLOPT_FAILONERROR , 0 );
2785
+ curl_easy_setopt (freq -> slot -> curl , CURLOPT_FAILONERROR , 0L );
2786
2786
curl_easy_setopt (freq -> slot -> curl , CURLOPT_WRITEFUNCTION , fwrite_sha1_file );
2787
2787
curl_easy_setopt (freq -> slot -> curl , CURLOPT_ERRORBUFFER , freq -> errorstr );
2788
2788
curl_easy_setopt (freq -> slot -> curl , CURLOPT_URL , freq -> url );
0 commit comments