From: Daniel Stenberg Date: Thu, 23 Jun 2022 10:02:32 +0000 (+0200) Subject: easy_lock.h: remove use of the deprecated ATOMIC_VAR_INIT macro X-Git-Tag: curl-7_84_0~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b67a0a1129b20a56ed04859fec8999f5c0c4280;p=thirdparty%2Fcurl.git easy_lock.h: remove use of the deprecated ATOMIC_VAR_INIT macro clang 14 warns about its use. It is being deprecated by the working group for the programming language C: "The macro ATOMIC_VAR_INIT is basically useless for the purpose for which it was designed" Ref: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2886.htm Reported-by: Tatsuhiro Tsujikawa Fixes #9041 Closes #9042 --- diff --git a/lib/easy_lock.h b/lib/easy_lock.h index 389b2a56d2..819f50ce81 100644 --- a/lib/easy_lock.h +++ b/lib/easy_lock.h @@ -38,7 +38,7 @@ #include #define curl_simple_lock atomic_bool -#define CURL_SIMPLE_LOCK_INIT ATOMIC_VAR_INIT(false) +#define CURL_SIMPLE_LOCK_INIT false static inline void curl_simple_lock_lock(curl_simple_lock *lock) {