]> git.meshlink.io Git - catta/commitdiff
cleaned some compiler warning flags
authoreverHannes <hannes.ahrens@everbase.net>
Sun, 16 Aug 2015 11:24:19 +0000 (13:24 +0200)
committerHiveError <hiveerror@gmail.com>
Sun, 16 Aug 2015 11:24:19 +0000 (13:24 +0200)
-Wdeclaration-after-statement -> stop confusing c90 warning, compilers by now should support c99 or above
-Wformat -> defined by -Wall
-Wendif-labels -> enabled by default
-Wpointer-arith -> defined by -pedantic
-Wno-cast-qual -> -Wcast-qual, have it or remove it

refer
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
https://gcc.gnu.org/onlinedocs/cpp/Invocation.html

configure.ac

index cabd87bfdb8f48c0e7b6414c61a7e42662a22e87..d760f340af3c5c40b76658830f07419f9239c5db 100644 (file)
@@ -254,7 +254,7 @@ test_gcc_flag() {
 # If using GCC specify some additional parameters
 if test "x$GCC" = "xyes" ; then
 
 # If using GCC specify some additional parameters
 if test "x$GCC" = "xyes" ; then
 
-    DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -fdiagnostics-show-option -Wno-cast-qual -fno-strict-aliasing"
+    DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wold-style-definition -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -fdiagnostics-show-option -fno-strict-aliasing"
 
     # when compiling for MingW, -Wmissing-noreturn is triggered a bunch of
     # times from autogenerated libtool wrappers, so leave it out on Windows.
 
     # when compiling for MingW, -Wmissing-noreturn is triggered a bunch of
     # times from autogenerated libtool wrappers, so leave it out on Windows.