File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ CC = clang
1010endif
1111ifeq ($(findstring clang, $(CC ) ) , clang)
1212E = -Weverything
13- CFLAGS += $E -Wno-unknown-warning-option -Wno-missing-prototypes
13+ CFLAGS += $E -Wno-unknown-warning-option
1414CFLAGS += -Wno-unsafe-buffer-usage
1515endif
1616CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ static char putcharSpyBuffer[SPY_BUFFER_MAX];
7272static UNITY_COUNTER_TYPE indexSpyBuffer ;
7373static UNITY_COUNTER_TYPE putcharSpyEnabled ;
7474
75+ #ifdef __clang__
76+ #pragma clang diagnostic push
77+ #pragma clang diagnostic ignored "-Wmissing-prototypes"
78+ #endif
79+
7580void startPutcharSpy (void )
7681{
7782 indexSpyBuffer = 0 ;
@@ -133,6 +138,10 @@ void flushSpy(void)
133138 if (flushSpyEnabled ){ flushSpyCalls ++ ; }
134139}
135140
141+ #ifdef __clang__
142+ #pragma clang diagnostic pop
143+ #endif
144+
136145#define TEST_ASSERT_EQUAL_PRINT_NUMBERS (expected , actual ) do { \
137146 startPutcharSpy(); UnityPrintNumber((actual)); endPutcharSpy(); \
138147 TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \
@@ -149,3 +158,10 @@ void flushSpy(void)
149158 } while (0)
150159
151160#endif
161+
162+ // The reason this isn't folded into the above diagnostic is to semi-isolate
163+ // the header contents from the user content it is included into.
164+ #ifdef __clang__
165+ #pragma clang diagnostic push
166+ #pragma clang diagnostic ignored "-Wmissing-prototypes"
167+ #endif
You can’t perform that action at this time.
0 commit comments