mirror of
https://github.com/curl/curl.git
synced 2026-05-30 03:07:28 +03:00
fixes
This commit is contained in:
parent
5d7215bb36
commit
d498dba2e8
6 changed files with 20 additions and 20 deletions
|
|
@ -519,7 +519,7 @@ static CURLcode cookie_setopts(struct OperationConfig *config, CURL *curl)
|
|||
ISBLANK(cl->data[0]) ? "" : " ", cl->data);
|
||||
if(result) {
|
||||
warnf("skipped provided cookie, the cookie header "
|
||||
"would go over %u bytes", MAX_COOKIE_LINE);
|
||||
"would go over %d bytes", MAX_COOKIE_LINE);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2255,7 +2255,7 @@ static ParameterError opt_file(struct OperationConfig *config,
|
|||
break;
|
||||
case C_CONFIG: /* --config */
|
||||
if(--max_recursive < 0) {
|
||||
errorf("Max config file recursion level reached (%u)",
|
||||
errorf("Max config file recursion level reached (%d)",
|
||||
CONFIG_MAX_LEVELS);
|
||||
err = PARAM_BAD_USE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ ParameterError setvariable(const char *input)
|
|||
line++;
|
||||
nlen = line - name;
|
||||
if(!nlen || (nlen >= MAX_VAR_LEN)) {
|
||||
warnf("Bad variable name length (%zd), skipping", nlen);
|
||||
warnf("Bad variable name length (%zu), skipping", nlen);
|
||||
return PARAM_OK;
|
||||
}
|
||||
if(import) {
|
||||
|
|
|
|||
|
|
@ -37,13 +37,13 @@ static CURLcode test_ws_data_m2_check_recv(const struct curl_ws_frame *frame,
|
|||
if(frame->flags & CURLWS_CLOSE) {
|
||||
curl_mfprintf(stderr, "recv_data: unexpected CLOSE frame from server, "
|
||||
"got %zu bytes, offset=%zu, rflags %x\n",
|
||||
nread, r_offset, frame->flags);
|
||||
nread, r_offset, (unsigned int)frame->flags);
|
||||
return CURLE_RECV_ERROR;
|
||||
}
|
||||
if(!r_offset && !(frame->flags & CURLWS_BINARY)) {
|
||||
curl_mfprintf(stderr, "recv_data: wrong frame, got %zu bytes, offset=%zu, "
|
||||
"rflags %x\n",
|
||||
nread, r_offset, frame->flags);
|
||||
nread, r_offset, (unsigned int)frame->flags);
|
||||
return CURLE_RECV_ERROR;
|
||||
}
|
||||
if(frame->offset != (curl_off_t)r_offset) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ static CURLcode test_lib1558(const char *URL)
|
|||
goto test_cleanup;
|
||||
}
|
||||
|
||||
curl_mprintf("Protocol: %lx\n", protocol);
|
||||
curl_mprintf("Protocol: %lx\n", (unsigned long)protocol);
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
curl_global_cleanup();
|
||||
|
|
|
|||
|
|
@ -1914,41 +1914,41 @@ static int get_nothing(void)
|
|||
|
||||
rc = curl_url_get(u, CURLUPART_SCHEME, &p, 0);
|
||||
if(rc != CURLUE_NO_SCHEME)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_get(u, CURLUPART_HOST, &p, 0);
|
||||
if(rc != CURLUE_NO_HOST)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_get(u, CURLUPART_USER, &p, 0);
|
||||
if(rc != CURLUE_NO_USER)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_get(u, CURLUPART_PASSWORD, &p, 0);
|
||||
if(rc != CURLUE_NO_PASSWORD)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_get(u, CURLUPART_OPTIONS, &p, 0);
|
||||
if(rc != CURLUE_NO_OPTIONS)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_get(u, CURLUPART_PATH, &p, 0);
|
||||
if(rc != CURLUE_OK)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
else
|
||||
curl_free(p);
|
||||
|
||||
rc = curl_url_get(u, CURLUPART_QUERY, &p, 0);
|
||||
if(rc != CURLUE_NO_QUERY)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_get(u, CURLUPART_FRAGMENT, &p, 0);
|
||||
if(rc != CURLUE_NO_FRAGMENT)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_get(u, CURLUPART_ZONEID, &p, 0);
|
||||
if(rc != CURLUE_NO_ZONEID)
|
||||
curl_mfprintf(stderr, "unexpected return code %u on line %u\n", rc,
|
||||
curl_mfprintf(stderr, "unexpected return code %d on line %d\n", rc,
|
||||
__LINE__);
|
||||
|
||||
curl_url_cleanup(u);
|
||||
|
|
@ -1981,17 +1981,17 @@ static int clear_url(void)
|
|||
for(i = 0; clear_url_list[i].in && !error; i++) {
|
||||
rc = curl_url_set(u, clear_url_list[i].part, clear_url_list[i].in, 0);
|
||||
if(rc != CURLUE_OK)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_set(u, CURLUPART_URL, NULL, 0);
|
||||
if(rc != CURLUE_OK)
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
|
||||
rc = curl_url_get(u, clear_url_list[i].part, &p, 0);
|
||||
if(rc != clear_url_list[i].ucode ||
|
||||
(clear_url_list[i].out && strcmp(p, clear_url_list[i].out) != 0)) {
|
||||
|
||||
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
|
||||
curl_mfprintf(stderr, "unexpected return code line %d\n", __LINE__);
|
||||
error++;
|
||||
}
|
||||
if(rc == CURLUE_OK)
|
||||
|
|
@ -2046,7 +2046,7 @@ static int huge(void)
|
|||
rc = curl_url_set(urlp, CURLUPART_URL, total, CURLU_NON_SUPPORT_SCHEME);
|
||||
if((!i && (rc != CURLUE_BAD_SCHEME)) ||
|
||||
(i && rc)) {
|
||||
curl_mprintf("URL %u: failed to parse [%s]\n", i, total);
|
||||
curl_mprintf("URL %d: failed to parse [%s]\n", i, total);
|
||||
error++;
|
||||
}
|
||||
|
||||
|
|
@ -2054,7 +2054,7 @@ static int huge(void)
|
|||
if(!rc) {
|
||||
curl_url_get(urlp, part[i], &partp, 0);
|
||||
if(!partp || strcmp(partp, &bigpart[1 - (i == 4)])) {
|
||||
curl_mprintf("URL %u part %u: failure\n", i, part[i]);
|
||||
curl_mprintf("URL %d part %u: failure\n", i, part[i]);
|
||||
error++;
|
||||
}
|
||||
curl_free(partp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue