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:42 +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 7cb2052d273fb192f266e715b7c2fea74cd1b446..21cd85dcfdadfde706af3cf085112d68987d1984 100644 (file)
@@ -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)
This page took 0.025785 seconds and 4 git commands to generate.