Fix Wmissing-noreturn errors

This commit is contained in:
Ross Smyth
2025-07-09 15:17:56 -04:00
parent 8bac36463d
commit faaaaa4fca
3 changed files with 14 additions and 5 deletions
+4 -4
View File
@@ -92,19 +92,19 @@ void testUnitySizeInitializationReminder(void)
TEST_ASSERT_EQUAL_MESSAGE(sizeof(Expected_Unity), sizeof(Unity), message);
}
void testPassShouldEndImmediatelyWithPass(void)
UNITY_FUNCTION_ATTR(noreturn) void testPassShouldEndImmediatelyWithPass(void)
{
TEST_PASS();
TEST_FAIL_MESSAGE("We should have passed already and finished this test");
}
void testPassShouldEndImmediatelyWithPassAndMessage(void)
UNITY_FUNCTION_ATTR(noreturn) void testPassShouldEndImmediatelyWithPassAndMessage(void)
{
TEST_PASS_MESSAGE("Woohoo! This Automatically Passes!");
TEST_FAIL_MESSAGE("We should have passed already and finished this test");
}
void testMessageShouldDisplayMessageWithoutEndingAndGoOnToPass(void)
UNITY_FUNCTION_ATTR(noreturn) void testMessageShouldDisplayMessageWithoutEndingAndGoOnToPass(void)
{
TEST_MESSAGE("This is just a message");
TEST_MESSAGE("This is another message");
@@ -282,7 +282,7 @@ void testProtection(void)
TEST_ASSERT_EQUAL(3, mask);
}
void testIgnoredAndThenFailInTearDown(void)
UNITY_FUNCTION_ATTR(noreturn) void testIgnoredAndThenFailInTearDown(void)
{
SetToOneToFailInTearDown = 1;
TEST_IGNORE();