]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: Makefile: add -Wdeclaration-after-statement
authorWilly Tarreau <w@1wt.eu>
Fri, 27 Feb 2015 15:34:50 +0000 (16:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 28 Feb 2015 22:12:30 +0000 (23:12 +0100)
This one makes it easier to detect accidentally misplaced variables
declarations in the code which are always a pain to deal with when
functions grow.

Makefile

index 620a2bedc11980a0c7be4abfcc74bd1d8d2e0e43..052c0821ae600fcbd2a8a7766656c9c83d77be35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -118,7 +118,7 @@ DEBUG_CFLAGS = -g
 #### Compiler-specific flags that may be used to disable some negative over-
 # optimization or to silence some warnings. -fno-strict-aliasing is needed with
 # gcc >= 4.4.
-SPEC_CFLAGS = -fno-strict-aliasing
+SPEC_CFLAGS = -fno-strict-aliasing -Wdeclaration-after-statement
 
 #### Memory usage tuning
 # If small memory footprint is required, you can reduce the buffer size. There