From: Daniel Stenberg Date: Wed, 31 May 2023 11:47:01 +0000 (+0200) Subject: tool: remove exclamation marks from error/warning messages X-Git-Tag: curl-8_2_0~170 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6661bd588d2c26fc9b68f0b5409167363b2d1f49;p=thirdparty%2Fcurl.git tool: remove exclamation marks from error/warning messages --- diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c index 36fe00ecc2..dc6069f1ab 100644 --- a/src/tool_cb_hdr.c +++ b/src/tool_cb_hdr.c @@ -82,8 +82,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata) #ifdef DEBUGBUILD if(size * nmemb > (size_t)CURL_MAX_HTTP_HEADER) { - warnf(per->config->global, "Header data exceeds single call write " - "limit!"); + warnf(per->config->global, "Header data exceeds single call write limit"); return CURL_WRITEFUNC_ERROR; } #endif diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c index 2f3b55a73f..94d82cb84a 100644 --- a/src/tool_cb_wrt.c +++ b/src/tool_cb_wrt.c @@ -62,7 +62,7 @@ bool tool_create_output_file(struct OutStruct *outs, DEBUGASSERT(config); global = config->global; if(!fname || !*fname) { - warnf(global, "Remote filename has no length!"); + warnf(global, "Remote filename has no length"); return FALSE; } @@ -176,13 +176,13 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) if(config->show_headers) { if(bytes > (size_t)CURL_MAX_HTTP_HEADER) { warnf(config->global, "Header data size exceeds single call write " - "limit!"); + "limit"); return CURL_WRITEFUNC_ERROR; } } else { if(bytes > (size_t)CURL_MAX_WRITE_SIZE) { - warnf(config->global, "Data size exceeds single call write limit!"); + warnf(config->global, "Data size exceeds single call write limit"); return CURL_WRITEFUNC_ERROR; } } diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c index f247413041..6ef2be721c 100644 --- a/src/tool_easysrc.c +++ b/src/tool_easysrc.c @@ -186,7 +186,7 @@ void dumpeasysrc(struct GlobalConfig *config) else out = stdout; if(!out) - warnf(config, "Failed to open %s to write libcurl code!", o); + warnf(config, "Failed to open %s to write libcurl code", o); else { int i; const char *c; diff --git a/src/tool_formparse.c b/src/tool_formparse.c index ba9c073859..fa38698d5e 100644 --- a/src/tool_formparse.c +++ b/src/tool_formparse.c @@ -506,7 +506,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, /* verify that this is a fine type specifier */ if(2 != sscanf(type, "%127[^/ ]/%127[^;, \n]", type_major, type_minor)) { - warnf(config->global, "Illegally formatted content-type field!"); + warnf(config->global, "Illegally formatted content-type field"); curl_slist_free_all(headers); return -1; /* illegal content-type syntax! */ } @@ -584,7 +584,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, sep = *p; *endpos = '\0'; if(slist_append(&headers, hdr)) { - errorf(config->global, "Out of memory for field header!"); + errorf(config->global, "Out of memory for field header"); curl_slist_free_all(headers); return -1; } @@ -772,7 +772,7 @@ int formparse(struct OperationConfig *config, else if(!name && !strcmp(contp, ")") && !literal_value) { /* Ending a multipart. */ if(*mimecurrent == *mimeroot) { - warnf(config->global, "no multipart to terminate!"); + warnf(config->global, "no multipart to terminate"); goto fail; } *mimecurrent = (*mimecurrent)->parent; @@ -896,7 +896,7 @@ int formparse(struct OperationConfig *config, SET_TOOL_MIME_PTR(part, name); } else { - warnf(config->global, "Illegally formatted input field!"); + warnf(config->global, "Illegally formatted input field"); goto fail; } err = 0; diff --git a/src/tool_getparam.c b/src/tool_getparam.c index c4c4be8bc6..8a06b6d624 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -539,7 +539,7 @@ static ParameterError GetSizeParameter(struct GlobalConfig *global, /* for plain bytes, leave as-is */ break; default: - warnf(global, "unsupported %s unit. Use G, M, K or B!", which); + warnf(global, "unsupported %s unit. Use G, M, K or B", which); return PARAM_BAD_USE; } *value_out = value; @@ -1255,7 +1255,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ case 'z': /* --libcurl */ #ifdef CURL_DISABLE_LIBCURL_OPTION warnf(global, - "--libcurl option was disabled at build-time!"); + "--libcurl option was disabled at build-time"); return PARAM_OPTION_UNKNOWN; #else GetStr(&global->libcurl, nextarg); @@ -1345,7 +1345,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ #ifdef CURLDEBUG global->test_event_based = toggle; #else - warnf(global, "--test-event is ignored unless a debug build!"); + warnf(global, "--test-event is ignored unless a debug build"); #endif break; case 'M': /* --unix-socket */ @@ -2016,7 +2016,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ bool use_stdin = !strcmp(&nextarg[1], "-"); FILE *file = use_stdin?stdin:fopen(&nextarg[1], FOPEN_READTEXT); if(!file) - warnf(global, "Failed to open %s!", &nextarg[1]); + warnf(global, "Failed to open %s", &nextarg[1]); else { err = file2memory(&string, &len, file); if(!err && string) { @@ -2238,7 +2238,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ } warnf(global, "A specified range MUST include at least one dash (-). " - "Appending one for you!"); + "Appending one for you"); msnprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", off); Curl_safefree(config->range); config->range = strdup(buffer); diff --git a/src/tool_operate.c b/src/tool_operate.c index 20b679ea73..cf85fe3a27 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1051,11 +1051,11 @@ static CURLcode single_transfer(struct GlobalConfig *global, result = get_url_file_name(&per->outfile, per->this_url); if(result) { errorf(global, "Failed to extract a sensible file name" - " from the URL to use for storage!"); + " from the URL to use for storage"); break; } if(!*per->outfile && !config->content_disposition) { - errorf(global, "Remote file name has no length!"); + errorf(global, "Remote file name has no length"); result = CURLE_WRITE_ERROR; break; } @@ -1067,11 +1067,11 @@ static CURLcode single_transfer(struct GlobalConfig *global, Curl_safefree(storefile); if(result) { /* bad globbing */ - warnf(global, "bad output glob!"); + warnf(global, "bad output glob"); break; } if(!*per->outfile) { - warnf(global, "output glob produces empty string!"); + warnf(global, "output glob produces empty string"); result = CURLE_WRITE_ERROR; break; } @@ -1173,7 +1173,7 @@ static CURLcode single_transfer(struct GlobalConfig *global, warnf(global, "Using --anyauth or --proxy-anyauth with upload from stdin" " involves a big risk of it not working. Use a temporary" - " file or a fixed auth type instead!"); + " file or a fixed auth type instead"); } DEBUGASSERT(per->infdopen == FALSE); @@ -1485,7 +1485,7 @@ static CURLcode single_transfer(struct GlobalConfig *global, my_setopt(curl, CURLOPT_HTTP09_ALLOWED, config->http09_allowed ? 1L : 0L); if(result) { - errorf(global, "HTTP/0.9 is not supported in this build!"); + errorf(global, "HTTP/0.9 is not supported in this build"); return result; } @@ -1797,7 +1797,7 @@ static CURLcode single_transfer(struct GlobalConfig *global, break; } else - warnf(global, "Couldn't find a known_hosts file!"); + warnf(global, "Couldn't find a known_hosts file"); } if(config->no_body || config->remote_time) { diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c index cc932a93c4..a93e20ec74 100644 --- a/src/tool_parsecfg.c +++ b/src/tool_parsecfg.c @@ -210,7 +210,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global) break; default: warnf(operation->global, "%s:%d: warning: '%s' uses unquoted " - "whitespace in the line that may cause side-effects!", + "whitespace in the line that may cause side-effects", filename, lineno, option); } }