← Commit list

2a395a0420

Viktor Szakats
Viktor Szakats
2026-08-30
SUCCESS Duration: 415s

Subject

easy: fix unused global on non-Windows

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 →

lib/easy.c+7 -2
@@ -80,7 +80,9 @@
/* true globals -- for curl_global_init() and curl_global_cleanup() */
static unsigned int initialized;
+#ifdef _WIN32
static long easy_init_flags;
+#endif
#ifdef GLOBAL_INIT_IS_THREADSAFE
@@ -176,7 +178,11 @@ static CURLcode global_init(long flags, bool memoryfuncs)
goto fail;
}
+#ifdef _WIN32
easy_init_flags = flags;
+#else
+ (void)flags;
+#endif
#ifdef DEBUGBUILD
if(getenv("CURL_GLOBAL_INIT"))
@@ -273,6 +279,7 @@ void curl_global_cleanup(void)
#ifdef _WIN32
Curl_win32_cleanup(easy_init_flags);
+ easy_init_flags = 0;
#endif
Curl_amiga_cleanup();
@@ -283,8 +290,6 @@ void curl_global_cleanup(void)
curlx_free(leakpointer);
#endif
- easy_init_flags = 0;
-
global_init_unlock();
}