urcu-wait: Initialize node in URCU_WAIT_NODE_INIT
authorOlivier Dion <odion@efficios.com>
Fri, 14 Jul 2023 17:09:21 +0000 (13:09 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 14 Jul 2023 17:14:25 +0000 (13:14 -0400)
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 <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/urcu-wait.h

index d922aeca2484fb14c096cb357904afd7624f556a..68a42dac22c67c8df9e14608a52c05b3b109e0f7 100644 (file)
@@ -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)
This page took 0.027342 seconds and 4 git commands to generate.