From: Olivier Dion Date: Fri, 14 Jul 2023 17:09:21 +0000 (-0400) Subject: urcu-wait: Initialize node in URCU_WAIT_NODE_INIT X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=542fb0dc9860863b1a869f9ad526da699b2179ff;p=userspace-rcu.git 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 --- 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)