commit 4ea18a07d5e39ca20993e9b7ec61f20f1777757b
Author: Svenja <skenneweg@techfak.uni-bielefeld.de>
Date:   Thu Jun 25 15:54:02 2020 +0200

    Fixed some warnings

diff --git a/inc/urt_node.h b/inc/urt_node.h
index 0e9deb5..23d1c62 100644
--- a/inc/urt_node.h
+++ b/inc/urt_node.h
@@ -40,6 +40,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* DATA STRUCTURES AND TYPES                                                  */
 /******************************************************************************/
 
+/*
+ * forward declarations
+ */
+typedef struct urt_node urt_node_t;
+
 /**
  * @brief
  *
@@ -50,7 +55,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * @return    .
  *
  */
-typedef void (*urt_nodeShutdownCallback_t)(struct urt_node* node, urt_status_t cause, void* arg);
+typedef void (*urt_nodeShutdownCallback_t)(urt_node_t* node, urt_status_t cause, void* arg);
 
 
 /**
@@ -62,7 +67,7 @@ typedef void (*urt_nodeShutdownCallback_t)(struct urt_node* node, urt_status_t c
  * @return    .
  *
  */
-typedef urt_osEventMask_t (*urt_nodeSetupCallback_t)(struct urt_node* node, void* arg);
+typedef urt_osEventMask_t (*urt_nodeSetupCallback_t)(urt_node_t* node, void* arg);
 
 
 /**
@@ -74,12 +79,12 @@ typedef urt_osEventMask_t (*urt_nodeSetupCallback_t)(struct urt_node* node, void
  *
  * @return    .
  */
-typedef urt_osEventMask_t (*urt_nodeLoopCallback_t)(struct urt_node* node, urt_osEventMask_t events, void* arg);
+typedef urt_osEventMask_t (*urt_nodeLoopCallback_t)(urt_node_t* node, urt_osEventMask_t events, void* arg);
 
 /**
  * @brief  node
  */
-typedef struct urt_node
+struct urt_node
 {
   struct urt_node* next;
   urt_osThread_t* thread;
@@ -94,7 +99,7 @@ typedef struct urt_node
   #if (URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING)
     uint64_t loops;
   #endif /* URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING */
-}urt_node_t;
+};
 
 
 /******************************************************************************/
@@ -109,9 +114,9 @@ typedef struct urt_node
 extern "C" {
 #endif /* defined(__cplusplus) */
 
-  void urtNodeInit(urt_node_t* node, urt_osThread_t* thread, urt_osThreadPrio_t prio, urt_nodeSetupCallback_t* setupcallback,
-                   void* setupparams, urt_nodeLoopCallback_t* loopcallback, void* loopparams,
-                   urt_nodeShutdownCallback_t* shutdowncallback, void* shutdownparams);
+  void urtNodeInit(urt_node_t* node, urt_osThread_t* thread, urt_osThreadPrio_t prio, urt_nodeSetupCallback_t setupcallback,
+                   void* setupparams, urt_nodeLoopCallback_t loopcallback, void* loopparams,
+                   urt_nodeShutdownCallback_t shutdowncallback, void* shutdownparams);
 #if defined(__cplusplus)
 }
 #endif /* defined(__cplusplus) */
diff --git a/src/urt_node.c b/src/urt_node.c
index 228fa83..76e64fa 100644
--- a/src/urt_node.c
+++ b/src/urt_node.c
@@ -37,9 +37,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* LOCAL VARIABLES                                                            */
 /******************************************************************************/
 
-urt_node_t localNode;
-static  URT_THREAD_MEMORY(_node_thread, AMIROOS_CFG_SHELL_STACKSIZE); //TODO: not here
-
 /******************************************************************************/
 /* LOCAL FUNCTIONS                                                            */
 /******************************************************************************/
@@ -51,12 +48,13 @@ static  URT_THREAD_MEMORY(_node_thread, AMIROOS_CFG_SHELL_STACKSIZE); //TODO: no
  */
 void _main(void* arg)
 {
+  urt_node_t* localNode = (urt_node_t*)arg;
   urt_osEventMask_t mask;
   urt_osEventFlags_t flag = 0;
-  urtEventRegister(urtCoreGetEvtSource(), &localNode.listener, mask, flag);
-  if (localNode.setupcallback != NULL)
+  urtEventRegister(urtCoreGetEvtSource(), &(localNode->listener), mask, flag);
+  if (localNode->setupcallback != NULL)
   {
-    mask = localNode.setupcallback(&localNode, arg);
+    mask = localNode->setupcallback(localNode, localNode->setupparams);
     if (mask == urtCoreGetEventMask())
     {
         urtCoreStopNodes(URT_STATUS_NODE_INVALEVTMASK);
@@ -64,7 +62,7 @@ void _main(void* arg)
   }
   else
   {
-     mask = ALL_EVENTS;
+     mask = URT_EVENTMASK_ALL;
   }
 
   if (urtCoreGetStatus() == URT_STATUS_OK)
@@ -77,9 +75,9 @@ void _main(void* arg)
     urt_osEventMask_t temp = urtEventWait(mask, URT_EVENT_WAIT_ONE, URT_DELAY_INFINITE);
     if (temp == urtCoreGetEventMask())
     {
-      localNode.loopcallback(&localNode, mask, arg);
+      localNode->loopcallback(localNode, mask, localNode->loopparams);
       #if (URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING)
-        localNode.loops++;
+        localNode->loops++;
       #endif /* URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING */
       if (mask == urtCoreGetEventMask())
       {
@@ -88,13 +86,13 @@ void _main(void* arg)
     }
   }
 
-  if (localNode.shutdowncallback)
+  if (localNode->shutdowncallback)
   {
-    localNode.shutdowncallback(&localNode, urtCoreGetStatus(), arg);
+    localNode->shutdowncallback(localNode, urtCoreGetStatus(), localNode->shutdownparams);
   }
-  urtEventUnregister(urtCoreGetEvtSource(), &localNode.listener);
+  urtEventUnregister(urtCoreGetEvtSource(), &localNode->listener);
 
-  urt_osThread_t* threadToTerminate = localNode.thread;
+  urt_osThread_t* threadToTerminate = localNode->thread;
   while (threadToTerminate->children != NULL || threadToTerminate->sibling != NULL)
   {
     if (threadToTerminate->children != NULL)
@@ -104,7 +102,7 @@ void _main(void* arg)
   }
   urtThreadTerminate(&threadToTerminate, URT_THREAD_TERMINATE_REQUEST);
 
-  urt_osThread_t* threadToJoin = localNode.thread;
+  urt_osThread_t* threadToJoin = localNode->thread;
   while (threadToJoin->children != NULL || threadToJoin->sibling != NULL)
   {
     if (threadToJoin->children != NULL)
@@ -140,9 +138,9 @@ void _main(void* arg)
  *                            Must be NULL if no shutdown callback is specified.
  *                            May be NULL if the specified shutdown callback does not expect parameters.
  */
-void urtNodeInit(urt_node_t* node, urt_osThread_t* thread, urt_osThreadPrio_t prio, urt_nodeSetupCallback_t* setupcallback,
-                 void* setupparams, urt_nodeLoopCallback_t* loopcallback, void* loopparams,
-                 urt_nodeShutdownCallback_t* shutdowncallback, void* shutdownparams)
+void urtNodeInit(urt_node_t* node, urt_osThread_t* thread, urt_osThreadPrio_t prio, urt_nodeSetupCallback_t setupcallback,
+                 void* setupparams, urt_nodeLoopCallback_t loopcallback, void* loopparams,
+                 urt_nodeShutdownCallback_t shutdowncallback, void* shutdownparams)
 {
   urtDebugAssert(node != NULL);
   urtDebugAssert(thread == NULL);
@@ -150,7 +148,7 @@ void urtNodeInit(urt_node_t* node, urt_osThread_t* thread, urt_osThreadPrio_t pr
     urtDebugAssert(setupparams == NULL);
 
   node->next = NULL;
-  node->thread = urtThreadInit(_node_thread, sizeof(_node_thread), prio, _main, setupparams);
+  node->thread = urtThreadInit(thread, sizeof(thread), prio, _main, node);
   node->setupcallback = setupcallback;
   node->setupparams = setupparams;
   node->loopcallback = loopcallback;
@@ -168,6 +166,5 @@ void urtNodeInit(urt_node_t* node, urt_osThread_t* thread, urt_osThreadPrio_t pr
     urt_node_t* nodeCore = urtCoreGetNodes();
     nodeCore = node;
   urtMutexUnlock(mutexTemp);
-  localNode = *node;
   return;
 }
diff --git a/urt_osal.h b/urt_osal.h
index 5c44f3a..b016da8 100644
--- a/urt_osal.h
+++ b/urt_osal.h
@@ -236,6 +236,10 @@ extern "C" {
  *    This constant is typically either 0x0..1 (low values have high priority)
  *    or 0x8..0 (high values have high priority).
  *    A value of 0 indicates that priorities are not supported.
+ *
+ * URT_EVENTMASK_ALL
+ *    Constant of type urt_osEventMask_t to filter no events at all.
+ *    Typically is 0xF..F.
  */
 
 /**
