]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Enable aggressive warnings C4061,C4296,C4389 and C4505 on MSVC.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 19 Feb 2012 23:08:02 +0000 (08:08 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 19 Feb 2012 23:08:02 +0000 (08:08 +0900)
CMakeLists.txt

index 02174036eb507589ec8e91f53806f9bbaa5c47d7..11d7378158d2bc07ccc3c86cab352d3724fa1301 100644 (file)
@@ -72,9 +72,19 @@ IF (MSVC)
   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
   # Set compile flags for debug build.
   # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug"
+  # Enable level 4 C4061: The enumerate has no associated handler in a switch
+  #                       statement.
+  # Enable level 4 C4296: An unsigned variable was used in a comparison
+  #                       operation with zero.
+  # Enable level 4 C4389: An operation involved signed and unsigned variables.
+  #                       This could result in a loss of data.
+  # Enable level 4 C4505: The given function is local and not referenced in
+  #                       the body of the module; therefore, the function is
+  #                       dead code.
   # Enable level 4 C4706: The test value in a conditional expression was the
   #                       result of an assignment.
-  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4706")
+  SET(CMAKE_C_FLAGS_DEBUG
+      "${CMAKE_C_FLAGS_DEBUG} /we4061 /we4296 /we4389 /we4505 /we4706")
 ENDIF (MSVC)
 
 # Enable CTest/CDash support