Skip to content

Commit 047722c

Browse files
committed
fix: maybe-uninitialized warning
1 parent 9c72552 commit 047722c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backends/open62541/src/import.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ static void addNodeImpl(AddNodeContext *context, NL_Node *node)
440440
addedNodeStatus = handleViewNode((const NL_ViewNode *)node, &id, &parentId,
441441
&parentReferenceId, &lt, &qn, &description, ServerContext_getServerObject(context->serverContext));
442442
break;
443+
default:
444+
addedNodeStatus = UA_STATUSCODE_BADNOTIMPLEMENTED;
443445
}
444446
// If a node was not added to the server due to an error, we add such a node
445447
// to a special node container. We can then try to add such nodes later.
@@ -684,7 +686,7 @@ bool NodesetLoader_loadFile(struct UA_Server *server, const char *path,
684686
UA_ServerConfig *config = UA_Server_getConfig(server);
685687
NodesetLoader_Logger *logger =
686688
(NodesetLoader_Logger *)calloc(1, sizeof(NodesetLoader_Logger));
687-
logger->context = (void*)(uintptr_t)config->logging;
689+
logger->context = (void*)(uintptr_t)&config->logger;
688690
logger->log = &logToOpen;
689691
NL_ReferenceService *refService = RefServiceImpl_new(server);
690692

0 commit comments

Comments
 (0)