aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2018-01-07 16:22:00 -0600
committerBrent Cook <bcook@openbsd.org>2018-01-07 16:22:00 -0600
commitaf624440e235ede8df0f194a3ccdfc317d42a7d4 (patch)
treeb046fc4578cef228f525675a98db0941ac2764c6
parentc3210983a5b466d310dc5af6cc58dec8ad61f02c (diff)
parentb0e9f0a354de9fbbf8bfa51e89ede2b97ec9890a (diff)
downloadportable-af624440e235ede8df0f194a3ccdfc317d42a7d4.tar.gz
portable-af624440e235ede8df0f194a3ccdfc317d42a7d4.tar.bz2
portable-af624440e235ede8df0f194a3ccdfc317d42a7d4.zip
Land #376, adjust MSVC warnings
-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)