summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorDani Martin <[email protected]>2020-03-26 18:48:34 +0100
committerGitHub <[email protected]>2020-03-26 18:48:34 +0100
commit2528854664b78a7db24cbe97b5b4e8bd52e1f18c (patch)
tree94c8a10d2d52a6fe720d2f6c1a99cae56858f09f /src
parent7ae7a87f8ae10ed9c68f308a62d7d7b0dc31a55a (diff)
downloadraylib-2528854664b78a7db24cbe97b5b4e8bd52e1f18c.tar.gz
raylib-2528854664b78a7db24cbe97b5b4e8bd52e1f18c.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile
index 8e598e5b..2a33b498 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -265,14 +265,16 @@ 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
# -Werror=pointer-arith catch unportable code that does direct arithmetic on void pointers
# -fno-strict-aliasing jar_xm.h does shady stuff (breaks strict aliasing)
-CFLAGS += -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing
+CFLAGS += -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing
+
+# 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 ($(PLATFORM), PLATFORM_WEB)
CFLAGS += -std=gnu99