← Commit list

210d8eca5b

Viktor Szakats
Viktor Szakats
2026-03-12
SUCCESS Duration: 249s

Subject

build: compiler warning silencing tidy-ups

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/tool_getparam.c+2 -1
@@ -3057,7 +3057,8 @@ ParameterError parse_args(int argc, argv_item_t argv[])
ParameterError err = PARAM_OK;
struct OperationConfig *config = global->first;
- for(i = 1, stillflags = TRUE; i < argc && !err; i++) {
+ stillflags = TRUE;
+ for(i = 1; i < argc && !err; i++) {
orig_opt = convert_tchar_to_UTF8(argv[i]);
if(!orig_opt)
return PARAM_NO_MEM;
src/tool_writeout.c+1 -1
@@ -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
tests/unit/unit1652.c+3 -3
@@ -88,9 +88,9 @@ static CURLcode test_unit1652(const char *arg)
UNITTEST_BEGIN(t1652_setup(&easy))
-#if defined(CURL_GNUC_DIAG) && !defined(__clang__)
+#ifdef CURL_GNUC_DIAG
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat"
+#pragma GCC diagnostic ignored "-Wformat" /* for GCC v5 to v8 */
#pragma GCC diagnostic ignored "-Wformat-zero-length"
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wformat-overflow"
@@ -157,7 +157,7 @@ static CURLcode test_unit1652(const char *arg)
fail_unless(output[sizeof(output) - 1] == '\0',
"Truncation of infof input 3");
-#if defined(CURL_GNUC_DIAG) && !defined(__clang__)
+#ifdef CURL_GNUC_DIAG
#pragma GCC diagnostic pop
#endif