diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-01-11 14:15:26 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-01-12 17:59:26 +0100 |
commit | 7d3b167f48eb2909b40f912e72c183c34e62024c (patch) | |
tree | 186849d28e6da6820e3f55438c4fd3e9067eaa8f /src | |
parent | 13991d60eeef7d1c6a7ac1e15a45c5210aa2a15d (diff) | |
download | curl-7d3b167f48eb2909b40f912e72c183c34e62024c.tar.gz |
curl: output warning at --verbose output for debug-enabled version
+ a libcurl warning in the debug output
Assisted-by: Jay Satiro
Ref: https://curl.se/mail/lib-2023-01/0039.html
Closes #10278
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_help.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tool_help.c b/src/tool_help.c index 709b8fefb..729b78c36 100644 --- a/src/tool_help.c +++ b/src/tool_help.c @@ -151,10 +151,21 @@ void tool_help(char *category) free(category); } +static bool is_debug(void) +{ + const char *const *builtin; + for(builtin = feature_names; *builtin; ++builtin) + if(curl_strequal("debug", *builtin)) + return TRUE; + return FALSE; +} void tool_version_info(void) { const char *const *builtin; + if(is_debug()) + fprintf(stderr, "WARNING: this libcurl is Debug-enabled, " + "do not use in production\n\n"); printf(CURL_ID "%s\n", curl_version()); #ifdef CURL_PATCHSTAMP |