From 2528854664b78a7db24cbe97b5b4e8bd52e1f18c Mon Sep 17 00:00:00 2001 From: Dani Martin <32535596+danimartin82@users.noreply.github.com> Date: Thu, 26 Mar 2020 18:48:34 +0100 Subject: Update compilation warning flags (#1151) * Update compilation warning flags Removed the -Wall flag that allow many warnings and added manually all the warning flags that don't generate warnings in the src/external folder. Specifically, these are some of the flags reporting errors in src/external: -Wmissing-prototypes -Wunused-variable -Wunused-value -Wunused-parameter -Wunused-function * Uptade compilation flags in examples with missing -std=c99 --- examples/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/Makefile b/examples/Makefile index ecd4344a..6162e36d 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -182,12 +182,14 @@ endif # -O1 defines optimization level # -g include debug information on compilation # -s strip unnecessary data from build -# -Wall turns on most, but not all, compiler warnings # -std=c99 defines C language mode (standard C from 1999 revision) # -std=gnu99 defines C language mode (GNU C from 1999 revision) # -Wno-missing-braces ignore invalid warning (GCC bug 53119) # -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec -CFLAGS += -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces +CFLAGS += -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces + +# Define compiler warning flags: +CFLAGS += -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wcast-align -Wchar-subscripts -Wchkp -Wdeprecated -Wformat-overflow -Wfree-nonheap-object -Wimplicit -Wint-in-bool-context -Wint-to-pointer-cast -Wmissing-parameter-type -Woverlength-strings -Wpointer-sign -Wpointer-to-int-cast -Wunused-label -Wunused-local-typedefs -Wunused-result ifeq ($(BUILD_MODE),DEBUG) CFLAGS += -g -- cgit v1.2.3