aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2018-01-06 18:12:50 +0900
committerkinichiro <kinichiro.inoguchi@gmail.com>2018-01-06 18:12:50 +0900
commitb0e9f0a354de9fbbf8bfa51e89ede2b97ec9890a (patch)
tree4f6fa2c50ed8a61f2078fe2c60726b7a1112e500 /CMakeLists.txt
parent52c39d42ea083506575ab75929dfa1edddd94c08 (diff)
downloadportable-b0e9f0a354de9fbbf8bfa51e89ede2b97ec9890a.tar.gz
portable-b0e9f0a354de9fbbf8bfa51e89ede2b97ec9890a.tar.bz2
portable-b0e9f0a354de9fbbf8bfa51e89ede2b97ec9890a.zip
Reconsider MSVC warning list
- Remove C4242 and C4820 - Warning explanation from manual - Sort by warning code
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt33
1 files changed, 15 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9814356..ef85176 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,26 +107,23 @@ if(MSVC)
107 message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler") 107 message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler")
108 if(CMAKE_C_COMPILER_ID MATCHES "MSVC") 108 if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
109 set(MSVC_DISABLED_WARNINGS_LIST 109 set(MSVC_DISABLED_WARNINGS_LIST
110 "C4057" # C4057: 'initializing' : 'unsigned char *' differs in 110 "C4018" # 'expression' : signed/unsigned mismatch
111 # indirection to slightly different base types from 'char [2]' 111 "C4057" # 'operator' : 'identifier1' indirection to
112 "C4018" # '>=': signed/unsigned mismatch 112 # slightly different base types from 'identifier2'
113 "C4100" # 'exarg' : unreferenced formal parameter 113 "C4100" # 'identifier' : unreferenced formal parameter
114 "C4127" # conditional expression is constant 114 "C4127" # conditional expression is constant
115 "C4146" # unary minus operator applied to unsigned 115 "C4146" # unary minus operator applied to unsigned type,
116 # type, result still unsigned 116 # result still unsigned
117 "C4242" # 'function' : conversion from 'int' to 'uint8_t', 117 "C4244" # 'argument' : conversion from 'type1' to 'type2',
118 # possible loss of data 118 # possible loss of data
119 "C4244" # 'function' : conversion from 'int' to 'uint8_t', 119 "C4245" # 'conversion' : conversion from 'type1' to 'type2',
120 # possible loss of data 120 # signed/unsigned mismatch
121 "C4245" # 'initializing': conversion from 'long' to 121 "C4267" # 'var' : conversion from 'size_t' to 'type',
122 # 'unsigned long', signed/unsigned mismatch 122 # possible loss of data
123 "C4267" # conversion from 'size_t' to 'some type that is almost 123 "C4389" # 'operator' : signed/unsigned mismatch
124 # certainly safe to convert a size_t to'.
125 "C4389" # '!=': signed/unsigned mismatch
126 "C4706" # assignment within conditional expression 124 "C4706" # assignment within conditional expression
127 "C4820" # 'bytes' bytes padding added after construct 'member_name' 125 "C4996" # The POSIX name for this item is deprecated.
128 "C4996" # 'read': The POSIX name for this item is deprecated. Instead, 126 # Instead, use the ISO C and C++ conformant name
129 # use the ISO C++ conformant name: _read.
130 ) 127 )
131 elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") 128 elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
132 add_definitions(-D_CRT_SUPPRESS_RESTRICT) 129 add_definitions(-D_CRT_SUPPRESS_RESTRICT)