From 035034fd78afbbc497b66fb846effaf9c59db883 Mon Sep 17 00:00:00 2001 From: Paul-Louis Ageneau Date: Fri, 26 Apr 2024 18:43:46 +0200 Subject: [PATCH] Remove deprecated ATOMIC_VAR_INIT macro --- src/agent.c | 2 +- src/log.c | 2 +- src/thread.h | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/agent.c b/src/agent.c index 6c008c3b..09af91c7 100644 --- a/src/agent.c +++ b/src/agent.c @@ -128,7 +128,7 @@ juice_agent_t *agent_create(const juice_config_t *config) { agent->state = JUICE_STATE_DISCONNECTED; agent->mode = AGENT_MODE_UNKNOWN; - agent->selected_entry = ATOMIC_VAR_INIT(NULL); + agent->selected_entry = NULL; agent->conn_index = -1; agent->conn_impl = NULL; diff --git a/src/log.c b/src/log.c index 00fe91b2..2d650296 100644 --- a/src/log.c +++ b/src/log.c @@ -33,7 +33,7 @@ static const char *log_level_colors[] = { static mutex_t log_mutex = MUTEX_INITIALIZER; static volatile juice_log_cb_t log_cb = NULL; -static atomic(juice_log_level_t) log_level = ATOMIC_VAR_INIT(JUICE_LOG_LEVEL_WARN); +static atomic(juice_log_level_t) log_level = JUICE_LOG_LEVEL_WARN; static bool use_color(void) { #ifdef _WIN32 diff --git a/src/thread.h b/src/thread.h index 2f8712c9..8d359585 100644 --- a/src/thread.h +++ b/src/thread.h @@ -141,7 +141,6 @@ static inline void thread_set_name_self(const char *name) { #define atomic_ptr(T) T *volatile #define atomic_store(a, v) (void)(*(a) = (v)) #define atomic_load(a) (*(a)) -#define ATOMIC_VAR_INIT(v) (v) #endif // if atomics