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.14.1~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=77f79f53c014be557246088462613cb96d96db85;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 93e8e51..aabb17c 100644 --- a/src/urcu-wait.h +++ b/src/urcu-wait.h @@ -50,7 +50,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)