From 450a69b1d6592d8bc45c28250b86ba4a8b1d8e54 Mon Sep 17 00:00:00 2001 From: NRK Date: Thu, 19 Oct 2023 16:16:12 +0600 Subject: various: remove ATOMIC_VAR_INIT the fallback needed it due to the struct wrapper. but the fallback is now removed so it's no longer needed. as for standard atomics, it was never really needed either, was useless and then made obsolete in C17 and removed in C23. ref: https://gustedt.wordpress.com/2018/08/06/c17-obsoletes-atomic_var_init/ ref: https://en.cppreference.com/w/c/atomic/ATOMIC_VAR_INIT --- osdep/windows_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'osdep') diff --git a/osdep/windows_utils.c b/osdep/windows_utils.c index 6a5abff291..b83a7ced9c 100644 --- a/osdep/windows_utils.c +++ b/osdep/windows_utils.c @@ -164,7 +164,7 @@ char *mp_HRESULT_to_str_buf(char *buf, size_t buf_size, HRESULT hr) bool mp_w32_create_anon_pipe(HANDLE *server, HANDLE *client, struct w32_create_anon_pipe_opts *opts) { - static atomic_ulong counter = ATOMIC_VAR_INIT(0); + static atomic_ulong counter = 0; // Generate pipe name unsigned long id = atomic_fetch_add(&counter, 1); -- cgit v1.2.3