@@ -731,7 +731,7 @@ static int has_proxy_cert_password(void)
731
731
732
732
static void set_curl_keepalive (CURL * c )
733
733
{
734
- curl_easy_setopt (c , CURLOPT_TCP_KEEPALIVE , 1 );
734
+ curl_easy_setopt (c , CURLOPT_TCP_KEEPALIVE , 1L );
735
735
}
736
736
737
737
/* Return 1 if redactions have been made, 0 otherwise. */
@@ -1032,13 +1032,13 @@ static CURL *get_curl_handle(void)
1032
1032
die ("curl_easy_init failed" );
1033
1033
1034
1034
if (!curl_ssl_verify ) {
1035
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 0 );
1036
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 0 );
1035
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 0L );
1036
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 0L );
1037
1037
} else {
1038
1038
/* Verify authenticity of the peer's certificate */
1039
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 1 );
1039
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 1L );
1040
1040
/* The name in the cert must match whom we tried to connect */
1041
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 2 );
1041
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 2L );
1042
1042
}
1043
1043
1044
1044
if (curl_http_version ) {
@@ -1141,8 +1141,8 @@ static CURL *get_curl_handle(void)
1141
1141
curl_low_speed_time );
1142
1142
}
1143
1143
1144
- curl_easy_setopt (result , CURLOPT_MAXREDIRS , 20 );
1145
- curl_easy_setopt (result , CURLOPT_POSTREDIR , CURL_REDIR_POST_ALL );
1144
+ curl_easy_setopt (result , CURLOPT_MAXREDIRS , 20L );
1145
+ curl_easy_setopt (result , CURLOPT_POSTREDIR , ( long ) CURL_REDIR_POST_ALL );
1146
1146
1147
1147
#ifdef GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR
1148
1148
{
@@ -1175,7 +1175,7 @@ static CURL *get_curl_handle(void)
1175
1175
user_agent ? user_agent : git_user_agent ());
1176
1176
1177
1177
if (curl_ftp_no_epsv )
1178
- curl_easy_setopt (result , CURLOPT_FTP_USE_EPSV , 0 );
1178
+ curl_easy_setopt (result , CURLOPT_FTP_USE_EPSV , 0L );
1179
1179
1180
1180
if (curl_ssl_try )
1181
1181
curl_easy_setopt (result , CURLOPT_USE_SSL , CURLUSESSL_TRY );
@@ -1217,18 +1217,18 @@ static CURL *get_curl_handle(void)
1217
1217
1218
1218
if (starts_with (curl_http_proxy , "socks5h" ))
1219
1219
curl_easy_setopt (result ,
1220
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS5_HOSTNAME );
1220
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS5_HOSTNAME );
1221
1221
else if (starts_with (curl_http_proxy , "socks5" ))
1222
1222
curl_easy_setopt (result ,
1223
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS5 );
1223
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS5 );
1224
1224
else if (starts_with (curl_http_proxy , "socks4a" ))
1225
1225
curl_easy_setopt (result ,
1226
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS4A );
1226
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS4A );
1227
1227
else if (starts_with (curl_http_proxy , "socks" ))
1228
1228
curl_easy_setopt (result ,
1229
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS4 );
1229
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS4 );
1230
1230
else if (starts_with (curl_http_proxy , "https" )) {
1231
- curl_easy_setopt (result , CURLOPT_PROXYTYPE , CURLPROXY_HTTPS );
1231
+ curl_easy_setopt (result , CURLOPT_PROXYTYPE , ( long ) CURLPROXY_HTTPS );
1232
1232
1233
1233
if (http_proxy_ssl_cert )
1234
1234
curl_easy_setopt (result , CURLOPT_PROXY_SSLCERT , http_proxy_ssl_cert );
@@ -1533,9 +1533,9 @@ struct active_request_slot *get_active_slot(void)
1533
1533
curl_easy_setopt (slot -> curl , CURLOPT_WRITEFUNCTION , NULL );
1534
1534
curl_easy_setopt (slot -> curl , CURLOPT_POSTFIELDS , NULL );
1535
1535
curl_easy_setopt (slot -> curl , CURLOPT_POSTFIELDSIZE , -1L );
1536
- curl_easy_setopt (slot -> curl , CURLOPT_UPLOAD , 0 );
1537
- curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1 );
1538
- curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 1 );
1536
+ curl_easy_setopt (slot -> curl , CURLOPT_UPLOAD , 0L );
1537
+ curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1L );
1538
+ curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 1L );
1539
1539
curl_easy_setopt (slot -> curl , CURLOPT_RANGE , NULL );
1540
1540
1541
1541
/*
@@ -1544,9 +1544,9 @@ struct active_request_slot *get_active_slot(void)
1544
1544
* HTTP_FOLLOW_* cases themselves.
1545
1545
*/
1546
1546
if (http_follow_config == HTTP_FOLLOW_ALWAYS )
1547
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1 );
1547
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1L );
1548
1548
else
1549
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 0 );
1549
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 0L );
1550
1550
1551
1551
curl_easy_setopt (slot -> curl , CURLOPT_IPRESOLVE , git_curl_ipresolve );
1552
1552
curl_easy_setopt (slot -> curl , CURLOPT_HTTPAUTH , http_auth_methods );
@@ -2113,12 +2113,12 @@ static int http_request(const char *url,
2113
2113
int ret ;
2114
2114
2115
2115
slot = get_active_slot ();
2116
- curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1 );
2116
+ curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1L );
2117
2117
2118
2118
if (!result ) {
2119
- curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 1 );
2119
+ curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 1L );
2120
2120
} else {
2121
- curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0 );
2121
+ curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0L );
2122
2122
curl_easy_setopt (slot -> curl , CURLOPT_WRITEDATA , result );
2123
2123
2124
2124
if (target == HTTP_REQUEST_FILE ) {
@@ -2144,7 +2144,7 @@ static int http_request(const char *url,
2144
2144
strbuf_addstr (& buf , " no-cache" );
2145
2145
if (options && options -> initial_request &&
2146
2146
http_follow_config == HTTP_FOLLOW_INITIAL )
2147
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1 );
2147
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1L );
2148
2148
2149
2149
headers = curl_slist_append (headers , buf .buf );
2150
2150
@@ -2163,7 +2163,7 @@ static int http_request(const char *url,
2163
2163
curl_easy_setopt (slot -> curl , CURLOPT_URL , url );
2164
2164
curl_easy_setopt (slot -> curl , CURLOPT_HTTPHEADER , headers );
2165
2165
curl_easy_setopt (slot -> curl , CURLOPT_ENCODING , "" );
2166
- curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 0 );
2166
+ curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 0L );
2167
2167
2168
2168
ret = run_one_slot (slot , & results );
2169
2169
@@ -2743,7 +2743,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
2743
2743
freq -> headers = object_request_headers ();
2744
2744
2745
2745
curl_easy_setopt (freq -> slot -> curl , CURLOPT_WRITEDATA , freq );
2746
- curl_easy_setopt (freq -> slot -> curl , CURLOPT_FAILONERROR , 0 );
2746
+ curl_easy_setopt (freq -> slot -> curl , CURLOPT_FAILONERROR , 0L );
2747
2747
curl_easy_setopt (freq -> slot -> curl , CURLOPT_WRITEFUNCTION , fwrite_sha1_file );
2748
2748
curl_easy_setopt (freq -> slot -> curl , CURLOPT_ERRORBUFFER , freq -> errorstr );
2749
2749
curl_easy_setopt (freq -> slot -> curl , CURLOPT_URL , freq -> url );
0 commit comments