From: Daniel Stenberg Date: Sat, 24 May 2025 13:32:33 +0000 (+0200) Subject: curl: only warn once for --manual in manual-disabled build X-Git-Tag: curl-8_14_0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b89fd6db7308dbc82215364318f9f73763521cd;p=thirdparty%2Fcurl.git curl: only warn once for --manual in manual-disabled build It would previously say it twice. Closes #17441 --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 3b9ff5d4a2..fd246bfd7a 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -2806,10 +2806,6 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ break; case C_MANUAL: /* --manual */ if(toggle) { /* --no-manual shows no manual... */ -#ifndef USE_MANUAL - warnf(global, - "built-in manual was disabled at build-time"); -#endif err = PARAM_MANUAL_REQUESTED; } break; diff --git a/src/tool_operate.c b/src/tool_operate.c index af9632c781..24e79e6f61 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2254,7 +2254,8 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) #ifdef USE_MANUAL hugehelp(); #else - puts("built-in manual was disabled at build-time"); + warnf(global, + "built-in manual was disabled at build-time"); #endif } /* Check if we were asked for the version information */