Skip to content

Commit 5a1c2bc

Browse files
committed
fix warning
1 parent fd997bd commit 5a1c2bc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tests/gtest_subtree.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ TEST(SubTree, DuplicateSubTreeName_Groot2Issue56)
759759
BehaviorTreeFactory factory;
760760

761761
// Should throw RuntimeError because of duplicate SubTree names
762-
ASSERT_THROW(factory.createTreeFromText(xml_text), RuntimeError);
762+
ASSERT_THROW((void)factory.createTreeFromText(xml_text), RuntimeError);
763763
}
764764

765765
// Additional test to verify the error message content
@@ -786,7 +786,7 @@ TEST(SubTree, DuplicateSubTreeName_ErrorMessage)
786786

787787
try
788788
{
789-
factory.createTreeFromText(xml_text);
789+
(void)factory.createTreeFromText(xml_text);
790790
FAIL() << "Expected RuntimeError to be thrown";
791791
}
792792
catch(const RuntimeError& e)
@@ -892,5 +892,5 @@ TEST(SubTree, NestedDuplicateNames_ShouldFail)
892892
BehaviorTreeFactory factory;
893893

894894
// Should throw RuntimeError because of duplicate SubTree names
895-
ASSERT_THROW(factory.createTreeFromText(xml_text), RuntimeError);
895+
ASSERT_THROW((void)factory.createTreeFromText(xml_text), RuntimeError);
896896
}

0 commit comments

Comments
 (0)