build: delete/replace 3 more clang warning pragmas

- tool_msgs: delete redundant `-Wformat-nonliteral` suppression pragma.

- whitespace formatting in `mprintf.h`, lib518, lib537.

- lib518: fix wrong variable in `sizeof()`.

- lib518: bump variables to `rlim_t`.
  Follow-up to e2b394106d #1469

- lib518: sync error message with lib537
  Follow-up to 365322b8bc

- lib518, lib537: replace `-Wformat-nonliteral` suppression pragmas
  by reworking test code.

Follow-up to 5b286c2508 #12812
Follow-up to aee4ebe591 #12803
Follow-up to 0923012758 #12540
Follow-up to 3829759bd0 #12489

Reviewed-by: Daniel Stenberg
Closes #12814
This commit is contained in:
Viktor Szakats 2024-01-28 00:06:37 +00:00
parent 0f4c19b66a
commit cb343182b7
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 85 additions and 133 deletions

View file

@ -124,14 +124,7 @@ void helpf(FILE *errors, const char *fmt, ...)
va_start(ap, fmt);
DEBUGASSERT(!strchr(fmt, '\n'));
fputs("curl: ", errors); /* prefix it */
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-nonliteral"
#endif
vfprintf(errors, fmt, ap);
#ifdef __clang__
#pragma clang diagnostic pop
#endif
va_end(ap);
fputs("\n", errors); /* newline it */
}