Browse Source

Enable warnings for MSVC builds

Also, fix warnings related to DVL_PRINTF_ATTRIBUTE
pull/1829/head
Anders Jenbo 5 years ago committed by GitHub
parent
commit
5b474b4781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CMakeLists.txt
  2. 2
      Source/miniwin/miniwin.h

2
CMakeLists.txt

@ -742,7 +742,7 @@ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_compile_options(${BIN_TARGET} PRIVATE "/W0")
target_compile_options(${BIN_TARGET} PRIVATE "/W1")
target_compile_options(${BIN_TARGET} PRIVATE "/Zc:__cplusplus")
target_compile_options(${BIN_TARGET} PRIVATE "/permissive-")
endif()

2
Source/miniwin/miniwin.h

@ -26,7 +26,7 @@ namespace devilution {
#define DVL_PRINTF_ATTRIBUTE(fmtargnum, firstarg) \
__attribute__((__format__(__printf__, fmtargnum, firstarg)))
#else
#define DVL_PRINTF_ATTRIBUTE(fmtargnum)
#define DVL_PRINTF_ATTRIBUTE(fmtargnum, firstarg)
#endif
typedef uint32_t DWORD;

Loading…
Cancel
Save