From 78ac8ebf9e989db50105f0bb4dfce133fff77cff Mon Sep 17 00:00:00 2001 From: Luis Diaz Mas Date: Wed, 1 Nov 2017 21:38:04 +0100 Subject: [PATCH] Add extra flags to detect more issues --- config/compilerFlags.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/compilerFlags.cmake b/config/compilerFlags.cmake index 57e91b3e..8d2ad6b9 100644 --- a/config/compilerFlags.cmake +++ b/config/compilerFlags.cmake @@ -29,6 +29,9 @@ if ( MINGW OR UNIX ) # MINGW, Linux, APPLE, CYGWIN " -Wdouble-promotion" " -Wshadow" " -Wuseless-cast" + " -Wpointer-arith" # This warning is also enabled by -Wpedantic + " -Wformat=2" + " -Warray-bounds=2" #" -Wold-style-cast" ) endif () @@ -60,6 +63,9 @@ if ( MINGW OR UNIX ) # MINGW, Linux, APPLE, CYGWIN " -Wconditional-uninitialized" " -Wdirect-ivar-access" " -Weffc++" + " -Wpointer-arith" + " -Wformat=2" + #" -Warray-bounds" # Enabled by default # These two raises lot of warnings. Use them wisely #" -Wconversion" #" -Wold-style-cast"