Commit 9e1ed9f2c0e5345eebbefdb6708fad274f37bdcd

Linquize 2014-04-01T23:01:40

Add CFLAGS -Wdeclaration-after-statement This warns local variables declarations after statement, which helps not to break MSVC

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cca2a12..23c5af1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -287,7 +287,7 @@ IF (MSVC)
    # Precompiled headers
 
 ELSE ()
-	SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes ${CMAKE_C_FLAGS}")
+	SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes -Wdeclaration-after-statement ${CMAKE_C_FLAGS}")
 
 	IF (WIN32 AND NOT CYGWIN)
 		SET(CMAKE_C_FLAGS_DEBUG "-D_DEBUG")