From: Michihiro NAKAJIMA Date: Sun, 19 Feb 2012 23:08:02 +0000 (+0900) Subject: Enable aggressive warnings C4061,C4296,C4389 and C4505 on MSVC. X-Git-Tag: v3.0.4~2^2~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2d783d05e847a5ba5ab1ec9fc18d2833c565f42;p=thirdparty%2Flibarchive.git Enable aggressive warnings C4061,C4296,C4389 and C4505 on MSVC. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 02174036e..11d737815 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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