build: compiler warning silencing tidy-ups

- tool_getparam: revert an unnecessary/no-op C89 warning silencer.
  Follow-up to 09c9afdd71 #20363

- tool_writeout: add comment saying silencing is a no-op for llvm/clang.
  For `strftime()` it is a GCC-specific, as of llvm/clang v22.1.0.
  Follow-up to f07a98ae11 #20366

- unit1652: drop always-false `!defined(__clang__)` guard.
  Pointed-out-by: Orgad Shaneh
  Ref: #20902
  Follow-up to 7e814c8717 #16062

- unit1652: document that `-Wformat` is necessary for GCC v5 to v8.
  Follow-up to 71cf0d1fca #14772

Closes #20908
This commit is contained in:
Viktor Szakats 2026-03-12 14:59:11 +01:00
parent d20fa5cd39
commit 210d8eca5b
No known key found for this signature in database
3 changed files with 6 additions and 5 deletions

View file

@ -580,7 +580,7 @@ static const char *outtime(const char *ptr, /* %time{ ... */
if(!result) {
struct tm utc;
result = curlx_gmtime(secs, &utc);
#ifdef __GNUC__
#ifdef __GNUC__ /* includes llvm/clang, but not affected as of v22.1.0 */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif