Skip to content

Commit aed313d

Browse files
committed
Fix -Wmissing-prototypes errors
This one was a bit tough, but I think this works fine.
1 parent 9fa095c commit aed313d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CC = clang
1010
endif
1111
ifeq ($(findstring clang, $(CC)), clang)
1212
E = -Weverything
13-
CFLAGS += $E -Wno-unknown-warning-option -Wno-missing-prototypes
13+
CFLAGS += $E -Wno-unknown-warning-option
1414
CFLAGS += -Wno-unsafe-buffer-usage
1515
endif
1616
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror

test/tests/self_assessment_utils.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ static char putcharSpyBuffer[SPY_BUFFER_MAX];
7272
static UNITY_COUNTER_TYPE indexSpyBuffer;
7373
static UNITY_COUNTER_TYPE putcharSpyEnabled;
7474

75+
#pragma clang diagnostic push
76+
#pragma clang diagnostic ignored "-Wmissing-prototypes"
77+
7578
void startPutcharSpy(void)
7679
{
7780
indexSpyBuffer = 0;
@@ -133,6 +136,8 @@ void flushSpy(void)
133136
if (flushSpyEnabled){ flushSpyCalls++; }
134137
}
135138

139+
#pragma clang diagnostic pop
140+
136141
#define TEST_ASSERT_EQUAL_PRINT_NUMBERS(expected, actual) do { \
137142
startPutcharSpy(); UnityPrintNumber((actual)); endPutcharSpy(); \
138143
TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \
@@ -149,3 +154,6 @@ void flushSpy(void)
149154
} while (0)
150155

151156
#endif
157+
158+
#pragma clang diagnostic push
159+
#pragma clang diagnostic ignored "-Wmissing-prototypes"

0 commit comments

Comments
 (0)