@@ -1044,13 +1044,13 @@ static CURL *get_curl_handle(void)
1044
1044
die ("curl_easy_init failed" );
1045
1045
1046
1046
if (!curl_ssl_verify ) {
1047
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 0 );
1048
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 0 );
1047
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 0l );
1048
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 0l );
1049
1049
} else {
1050
1050
/* Verify authenticity of the peer's certificate */
1051
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 1 );
1051
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYPEER , 1l );
1052
1052
/* The name in the cert must match whom we tried to connect */
1053
- curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 2 );
1053
+ curl_easy_setopt (result , CURLOPT_SSL_VERIFYHOST , 2l );
1054
1054
}
1055
1055
1056
1056
if (curl_http_version ) {
@@ -1153,8 +1153,8 @@ static CURL *get_curl_handle(void)
1153
1153
curl_low_speed_time );
1154
1154
}
1155
1155
1156
- curl_easy_setopt (result , CURLOPT_MAXREDIRS , 20 );
1157
- curl_easy_setopt (result , CURLOPT_POSTREDIR , CURL_REDIR_POST_ALL );
1156
+ curl_easy_setopt (result , CURLOPT_MAXREDIRS , 20l );
1157
+ curl_easy_setopt (result , CURLOPT_POSTREDIR , ( long ) CURL_REDIR_POST_ALL );
1158
1158
1159
1159
#ifdef GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR
1160
1160
{
@@ -1187,7 +1187,7 @@ static CURL *get_curl_handle(void)
1187
1187
user_agent ? user_agent : git_user_agent ());
1188
1188
1189
1189
if (curl_ftp_no_epsv )
1190
- curl_easy_setopt (result , CURLOPT_FTP_USE_EPSV , 0 );
1190
+ curl_easy_setopt (result , CURLOPT_FTP_USE_EPSV , 0l );
1191
1191
1192
1192
if (curl_ssl_try )
1193
1193
curl_easy_setopt (result , CURLOPT_USE_SSL , CURLUSESSL_TRY );
@@ -1229,18 +1229,18 @@ static CURL *get_curl_handle(void)
1229
1229
1230
1230
if (starts_with (curl_http_proxy , "socks5h" ))
1231
1231
curl_easy_setopt (result ,
1232
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS5_HOSTNAME );
1232
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS5_HOSTNAME );
1233
1233
else if (starts_with (curl_http_proxy , "socks5" ))
1234
1234
curl_easy_setopt (result ,
1235
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS5 );
1235
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS5 );
1236
1236
else if (starts_with (curl_http_proxy , "socks4a" ))
1237
1237
curl_easy_setopt (result ,
1238
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS4A );
1238
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS4A );
1239
1239
else if (starts_with (curl_http_proxy , "socks" ))
1240
1240
curl_easy_setopt (result ,
1241
- CURLOPT_PROXYTYPE , CURLPROXY_SOCKS4 );
1241
+ CURLOPT_PROXYTYPE , ( long ) CURLPROXY_SOCKS4 );
1242
1242
else if (starts_with (curl_http_proxy , "https" )) {
1243
- curl_easy_setopt (result , CURLOPT_PROXYTYPE , CURLPROXY_HTTPS );
1243
+ curl_easy_setopt (result , CURLOPT_PROXYTYPE , ( long ) CURLPROXY_HTTPS );
1244
1244
1245
1245
if (http_proxy_ssl_cert )
1246
1246
curl_easy_setopt (result , CURLOPT_PROXY_SSLCERT , http_proxy_ssl_cert );
@@ -1290,7 +1290,7 @@ static CURL *get_curl_handle(void)
1290
1290
}
1291
1291
init_curl_proxy_auth (result );
1292
1292
1293
- curl_easy_setopt (result , CURLOPT_TCP_KEEPALIVE , 1 );
1293
+ curl_easy_setopt (result , CURLOPT_TCP_KEEPALIVE , 1l );
1294
1294
1295
1295
if (curl_tcp_keepidle > -1 )
1296
1296
curl_easy_setopt (result , CURLOPT_TCP_KEEPIDLE ,
@@ -1576,9 +1576,9 @@ struct active_request_slot *get_active_slot(void)
1576
1576
curl_easy_setopt (slot -> curl , CURLOPT_WRITEFUNCTION , NULL );
1577
1577
curl_easy_setopt (slot -> curl , CURLOPT_POSTFIELDS , NULL );
1578
1578
curl_easy_setopt (slot -> curl , CURLOPT_POSTFIELDSIZE , -1L );
1579
- curl_easy_setopt (slot -> curl , CURLOPT_UPLOAD , 0 );
1580
- curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1 );
1581
- curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 1 );
1579
+ curl_easy_setopt (slot -> curl , CURLOPT_UPLOAD , 0l );
1580
+ curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1l );
1581
+ curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 1l );
1582
1582
curl_easy_setopt (slot -> curl , CURLOPT_RANGE , NULL );
1583
1583
1584
1584
/*
@@ -1587,9 +1587,9 @@ struct active_request_slot *get_active_slot(void)
1587
1587
* HTTP_FOLLOW_* cases themselves.
1588
1588
*/
1589
1589
if (http_follow_config == HTTP_FOLLOW_ALWAYS )
1590
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1 );
1590
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1l );
1591
1591
else
1592
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 0 );
1592
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 0l );
1593
1593
1594
1594
curl_easy_setopt (slot -> curl , CURLOPT_IPRESOLVE , git_curl_ipresolve );
1595
1595
curl_easy_setopt (slot -> curl , CURLOPT_HTTPAUTH , http_auth_methods );
@@ -2156,12 +2156,12 @@ static int http_request(const char *url,
2156
2156
int ret ;
2157
2157
2158
2158
slot = get_active_slot ();
2159
- curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1 );
2159
+ curl_easy_setopt (slot -> curl , CURLOPT_HTTPGET , 1l );
2160
2160
2161
2161
if (!result ) {
2162
- curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 1 );
2162
+ curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 1l );
2163
2163
} else {
2164
- curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0 );
2164
+ curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0l );
2165
2165
curl_easy_setopt (slot -> curl , CURLOPT_WRITEDATA , result );
2166
2166
2167
2167
if (target == HTTP_REQUEST_FILE ) {
@@ -2187,7 +2187,7 @@ static int http_request(const char *url,
2187
2187
strbuf_addstr (& buf , " no-cache" );
2188
2188
if (options && options -> initial_request &&
2189
2189
http_follow_config == HTTP_FOLLOW_INITIAL )
2190
- curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1 );
2190
+ curl_easy_setopt (slot -> curl , CURLOPT_FOLLOWLOCATION , 1l );
2191
2191
2192
2192
headers = curl_slist_append (headers , buf .buf );
2193
2193
@@ -2206,7 +2206,7 @@ static int http_request(const char *url,
2206
2206
curl_easy_setopt (slot -> curl , CURLOPT_URL , url );
2207
2207
curl_easy_setopt (slot -> curl , CURLOPT_HTTPHEADER , headers );
2208
2208
curl_easy_setopt (slot -> curl , CURLOPT_ENCODING , "" );
2209
- curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 0 );
2209
+ curl_easy_setopt (slot -> curl , CURLOPT_FAILONERROR , 0l );
2210
2210
2211
2211
ret = run_one_slot (slot , & results );
2212
2212
@@ -2786,7 +2786,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
2786
2786
freq -> headers = object_request_headers ();
2787
2787
2788
2788
curl_easy_setopt (freq -> slot -> curl , CURLOPT_WRITEDATA , freq );
2789
- curl_easy_setopt (freq -> slot -> curl , CURLOPT_FAILONERROR , 0 );
2789
+ curl_easy_setopt (freq -> slot -> curl , CURLOPT_FAILONERROR , 0l );
2790
2790
curl_easy_setopt (freq -> slot -> curl , CURLOPT_WRITEFUNCTION , fwrite_sha1_file );
2791
2791
curl_easy_setopt (freq -> slot -> curl , CURLOPT_ERRORBUFFER , freq -> errorstr );
2792
2792
curl_easy_setopt (freq -> slot -> curl , CURLOPT_URL , freq -> url );
0 commit comments