1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-29 11:14:27 +01:00

Fix C89 warnings about variables at top of scope, enums, variadic macros

Add extern UnityFixture in internals header. Add C89 target in Makefile
 clang will show these warnings but can suppress "//" with -Wno-comment.
This commit is contained in:
jsalling
2016-02-17 22:26:18 -06:00
parent 915e3fb9fc
commit 3bb51bd740
4 changed files with 30 additions and 12 deletions

View File

@@ -34,6 +34,11 @@ noStdlibMalloc: ../build/
@ echo "build with noStdlibMalloc"
./$(TARGET)
clang89: ../build/
clang $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -m32 -std=c89 -Wno-comment
clang $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -m32 \
-D UNITY_EXCLUDE_STDLIB_MALLOC -std=c89 -Wno-comment ; ./$(TARGET)
clangEverything:
clang $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -m64 -Weverything
@@ -56,5 +61,6 @@ CFLAGS += -Wstrict-overflow=5
CFLAGS += -Wstrict-prototypes
CFLAGS += -Wswitch-default
CFLAGS += -Wundef
CFLAGS += -Wno-error=undef # Warning only, this should not stop the build
CFLAGS += -Wunused
CFLAGS += -fstrict-aliasing