mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
tool_operate.c: Fixed compilation warnings
An enumerated type is mixed with another type.
This commit is contained in:
parent
65bb4a0d38
commit
5b8ae0a985
@ -202,7 +202,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
|
|||||||
CURL *curl = config->easy;
|
CURL *curl = config->easy;
|
||||||
char *httpgetfields = NULL;
|
char *httpgetfields = NULL;
|
||||||
|
|
||||||
int res = 0;
|
CURLcode res = 0;
|
||||||
unsigned long li;
|
unsigned long li;
|
||||||
|
|
||||||
/* Save the values of noprogress and isatty to restore them later on */
|
/* Save the values of noprogress and isatty to restore them later on */
|
||||||
@ -398,7 +398,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
|
|||||||
|
|
||||||
if(!config->globoff && infiles) {
|
if(!config->globoff && infiles) {
|
||||||
/* Unless explicitly shut off */
|
/* Unless explicitly shut off */
|
||||||
res = glob_url(&inglob, infiles, &infilenum,
|
res = (CURLcode) glob_url(&inglob, infiles, &infilenum,
|
||||||
global->showerror?global->errors:NULL);
|
global->showerror?global->errors:NULL);
|
||||||
if(res) {
|
if(res) {
|
||||||
Curl_safefree(outfiles);
|
Curl_safefree(outfiles);
|
||||||
@ -423,7 +423,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
|
|||||||
Curl_nop_stmt;
|
Curl_nop_stmt;
|
||||||
else {
|
else {
|
||||||
if(inglob) {
|
if(inglob) {
|
||||||
res = glob_next_url(&uploadfile, inglob);
|
res = (CURLcode) glob_next_url(&uploadfile, inglob);
|
||||||
if(res == CURLE_OUT_OF_MEMORY)
|
if(res == CURLE_OUT_OF_MEMORY)
|
||||||
helpf(global->errors, "out of memory\n");
|
helpf(global->errors, "out of memory\n");
|
||||||
}
|
}
|
||||||
@ -449,7 +449,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
|
|||||||
if(!config->globoff) {
|
if(!config->globoff) {
|
||||||
/* Unless explicitly shut off, we expand '{...}' and '[...]'
|
/* Unless explicitly shut off, we expand '{...}' and '[...]'
|
||||||
expressions and return total number of URLs in pattern set */
|
expressions and return total number of URLs in pattern set */
|
||||||
res = glob_url(&urls, urlnode->url, &urlnum,
|
res = (CURLcode) glob_url(&urls, urlnode->url, &urlnum,
|
||||||
global->showerror?global->errors:NULL);
|
global->showerror?global->errors:NULL);
|
||||||
if(res) {
|
if(res) {
|
||||||
Curl_safefree(uploadfile);
|
Curl_safefree(uploadfile);
|
||||||
@ -504,7 +504,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(urls) {
|
if(urls) {
|
||||||
res = glob_next_url(&this_url, urls);
|
res = (CURLcode) glob_next_url(&this_url, urls);
|
||||||
if(res)
|
if(res)
|
||||||
goto show_error;
|
goto show_error;
|
||||||
}
|
}
|
||||||
@ -561,7 +561,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
|
|||||||
else if(urls) {
|
else if(urls) {
|
||||||
/* fill '#1' ... '#9' terms from URL pattern */
|
/* fill '#1' ... '#9' terms from URL pattern */
|
||||||
char *storefile = outfile;
|
char *storefile = outfile;
|
||||||
res = glob_match_url(&outfile, storefile, urls);
|
res = (CURLcode) glob_match_url(&outfile, storefile, urls);
|
||||||
Curl_safefree(storefile);
|
Curl_safefree(storefile);
|
||||||
if(res) {
|
if(res) {
|
||||||
/* bad globbing */
|
/* bad globbing */
|
||||||
@ -1769,7 +1769,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
|
|||||||
/* Release metalink related resources here */
|
/* Release metalink related resources here */
|
||||||
clean_metalink(config);
|
clean_metalink(config);
|
||||||
|
|
||||||
return (CURLcode)res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
|
CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
|
||||||
|
Loading…
Reference in New Issue
Block a user