Skip to content

Commit

Permalink
easy_lock.h: remove use of the deprecated ATOMIC_VAR_INIT macro
Browse files Browse the repository at this point in the history
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 curl#9041
Closes curl#9042
  • Loading branch information
bagder committed Jun 23, 2022
1 parent 8135d42 commit 2b67a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/easy_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <stdatomic.h>

#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)
{
Expand Down

0 comments on commit 2b67a0a

Please sign in to comment.