From a01aa986e64ade209cb41f3047a372fe4f61c02f Mon Sep 17 00:00:00 2001 From: Hofmann Jonas Date: Thu, 11 Dec 2025 08:07:23 +0100 Subject: [PATCH] corrected treeSizeRec cause previously end of non void function could be reached --- bintree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bintree.c b/bintree.c index 6379392..4391f2a 100644 --- a/bintree.c +++ b/bintree.c @@ -12,7 +12,6 @@ * `nextTreeData`: Traversierung mit Hilfe des zuvor implementierten Stacks. Done */ - static TreeNode *root = NULL; static StackNode *stackRoot = NULL; @@ -185,5 +184,7 @@ int treeSizeRec(const TreeNode *currentNode) nodeCount += treeSizeRec(currentNode->right); return nodeCount + 1; } + + return nodeCount; }