From 542fb0dc9860863b1a869f9ad526da699b2179ff Mon Sep 17 00:00:00 2001 From: Olivier Dion Date: Fri, 14 Jul 2023 13:09:21 -0400 Subject: [PATCH] urcu-wait: Initialize node in URCU_WAIT_NODE_INIT C++ emits warnings with the URCU_WAIT_NODE_INIT() macro because the member node is not initialized. Fix this by initializing the node to null. Change-Id: I7ee3b35624ef61cab826e3668f111e2483ca3c05 Signed-off-by: Olivier Dion Signed-off-by: Mathieu Desnoyers --- src/urcu-wait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/urcu-wait.h b/src/urcu-wait.h index d922aec..68a42da 100644 --- a/src/urcu-wait.h +++ b/src/urcu-wait.h @@ -36,7 +36,7 @@ struct urcu_wait_node { }; #define URCU_WAIT_NODE_INIT(name, _state) \ - { .state = _state } + { .node = { .next = NULL }, .state = _state } #define DEFINE_URCU_WAIT_NODE(name, state) \ struct urcu_wait_node name = URCU_WAIT_NODE_INIT(name, state) -- 2.34.1