mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:33:42 +03:00
build: more -Wformat fixes
- memdebug: update to not trigger `-Wformat-nonliteral` warnings.
- imap: mark `imap_sendf()` with `CURL_PRINTF()`.
- tool_msgs: mark static function with `CURL_PRINTF()`.
Follow-up to 3829759bd0 #12489
Closes #12540
This commit is contained in:
parent
03e7dff8ff
commit
0923012758
3 changed files with 21 additions and 66 deletions
|
|
@ -36,6 +36,11 @@
|
|||
#define NOTE_PREFIX "Note: "
|
||||
#define ERROR_PREFIX "curl: "
|
||||
|
||||
static void voutf(struct GlobalConfig *config,
|
||||
const char *prefix,
|
||||
const char *fmt,
|
||||
va_list ap) CURL_PRINTF(3, 0);
|
||||
|
||||
static void voutf(struct GlobalConfig *config,
|
||||
const char *prefix,
|
||||
const char *fmt,
|
||||
|
|
@ -107,7 +112,6 @@ void notef(struct GlobalConfig *config, const char *fmt, ...)
|
|||
* Emit warning formatted message on configured 'errors' stream unless
|
||||
* mute (--silent) was selected.
|
||||
*/
|
||||
|
||||
void warnf(struct GlobalConfig *config, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
|
@ -115,6 +119,7 @@ void warnf(struct GlobalConfig *config, const char *fmt, ...)
|
|||
voutf(config, WARN_PREFIX, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/*
|
||||
* Emit help formatted message on given stream. This is for errors with or
|
||||
* related to command line arguments.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue