File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1111ifeq ($(findstring clang, $(CC ) ) , clang)
1212E = -Weverything
1313CFLAGS += $E -Wno-unknown-warning-option -Wno-missing-prototypes
14- CFLAGS += -Wno-unused-macros -Wno-padded -Wno-missing-noreturn
14+ CFLAGS += -Wno-unused-macros -Wno-padded
1515CFLAGS += -Wno-unsafe-buffer-usage
1616endif
1717CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
Original file line number Diff line number Diff line change @@ -92,19 +92,19 @@ void testUnitySizeInitializationReminder(void)
9292 TEST_ASSERT_EQUAL_MESSAGE (sizeof (Expected_Unity ), sizeof (Unity ), message );
9393}
9494
95- void testPassShouldEndImmediatelyWithPass (void )
95+ __attribute__(( noreturn )) void testPassShouldEndImmediatelyWithPass (void )
9696{
9797 TEST_PASS ();
9898 TEST_FAIL_MESSAGE ("We should have passed already and finished this test" );
9999}
100100
101- void testPassShouldEndImmediatelyWithPassAndMessage (void )
101+ __attribute__(( noreturn )) void testPassShouldEndImmediatelyWithPassAndMessage (void )
102102{
103103 TEST_PASS_MESSAGE ("Woohoo! This Automatically Passes!" );
104104 TEST_FAIL_MESSAGE ("We should have passed already and finished this test" );
105105}
106106
107- void testMessageShouldDisplayMessageWithoutEndingAndGoOnToPass (void )
107+ __attribute__(( noreturn )) void testMessageShouldDisplayMessageWithoutEndingAndGoOnToPass (void )
108108{
109109 TEST_MESSAGE ("This is just a message" );
110110 TEST_MESSAGE ("This is another message" );
@@ -282,7 +282,7 @@ void testProtection(void)
282282 TEST_ASSERT_EQUAL (3 , mask );
283283}
284284
285- void testIgnoredAndThenFailInTearDown (void )
285+ __attribute__(( noreturn )) void testIgnoredAndThenFailInTearDown (void )
286286{
287287 SetToOneToFailInTearDown = 1 ;
288288 TEST_IGNORE ();
Original file line number Diff line number Diff line change @@ -1208,6 +1208,9 @@ void testNotEqualFloatEachEqualLengthZero(void)
12081208#endif
12091209}
12101210
1211+ #if defined(UNITY_EXCLUDE_FLOAT_PRINT ) || defined(UNITY_INCLUDE_DOUBLE ) || !defined(USING_OUTPUT_SPY )
1212+ __attribute__((noreturn ))
1213+ #endif
12111214void testFloatPrinting (void )
12121215{
12131216#if defined(UNITY_EXCLUDE_FLOAT_PRINT ) || defined(UNITY_INCLUDE_DOUBLE ) || !defined(USING_OUTPUT_SPY )
@@ -1257,6 +1260,9 @@ void testFloatPrinting(void)
12571260#endif
12581261}
12591262
1263+ #if defined(UNITY_EXCLUDE_FLOAT_PRINT ) || defined(UNITY_INCLUDE_DOUBLE ) || !defined(USING_OUTPUT_SPY )
1264+ __attribute__((noreturn ))
1265+ #endif
12601266void testFloatPrintingRoundTiesToEven (void )
12611267{
12621268#if defined(UNITY_EXCLUDE_FLOAT_PRINT ) || defined(UNITY_INCLUDE_DOUBLE ) || !defined(USING_OUTPUT_SPY )
@@ -1368,6 +1374,9 @@ static void printFloatValue(float f)
13681374#endif
13691375#endif
13701376
1377+ #if !defined(UNITY_TEST_ALL_FLOATS_PRINT_OK ) || !defined(USING_OUTPUT_SPY )
1378+ __attribute__((noreturn ))
1379+ #endif
13711380void testFloatPrintingRandomSamples (void )
13721381{
13731382#if !defined(UNITY_TEST_ALL_FLOATS_PRINT_OK ) || !defined(USING_OUTPUT_SPY )
You can’t perform that action at this time.
0 commit comments