]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool: remove exclamation marks from error/warning messages
authorDaniel Stenberg <daniel@haxx.se>
Wed, 31 May 2023 11:47:01 +0000 (13:47 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 1 Jun 2023 06:19:21 +0000 (08:19 +0200)
src/tool_cb_hdr.c
src/tool_cb_wrt.c
src/tool_easysrc.c
src/tool_formparse.c
src/tool_getparam.c
src/tool_operate.c
src/tool_parsecfg.c

index 36fe00ecc22e32c07e84dbb3dbf59b902ce50701..dc6069f1abca8d3214d4300bb73d9cac2cbfdd3a 100644 (file)
@@ -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
index 2f3b55a73f08041341f26364d4dda90574741e6b..94d82cb84a870d97ffa2d834271af96743419dcd 100644 (file)
@@ -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;
     }
   }
index f2474130419e4d0d70d5eec93c019f43e894f823..6ef2be721cfd4d475494bd9254240aeca0d22a84 100644 (file)
@@ -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;
index ba9c073859ed300a9b1c4c77e07bcde9f8f7c8c1..fa38698d5e791ac23f210e0fff44ab946fd92c8a 100644 (file)
@@ -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;
index c4c4be8bc6a94443c2764ec4424b0abd2d344ce7..8a06b6d62423d3e55dd6524c396f278bc4351357 100644 (file)
@@ -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);
index 20b679ea731ab01f7ce4986006349eba31c6eaf1..cf85fe3a271dd01b3f03f86968812b9017ea8ecb 100644 (file)
@@ -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) {
index cc932a93c47837a11639ee2c183d3971ebead24b..a93e20ec74636dd96f2f547053b56e9406ab2868 100644 (file)
@@ -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);
           }
         }