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-Tag: v0.13.4~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3a10734e5c475792ce16f9d0f254cec43083ead7;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 7cb2052..21cd85d 100644 --- a/src/urcu-wait.h +++ b/src/urcu-wait.h @@ -49,7 +49,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)