[3RDPARTY] Make some warnings non-fatal
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 1 Apr 2019 15:55:03 +0000 (17:55 +0200)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 13 Apr 2019 12:07:50 +0000 (14:07 +0200)
14 files changed:
dll/3rdparty/libtiff/CMakeLists.txt
dll/directx/wine/d3dcompiler_43/CMakeLists.txt
dll/directx/wine/wined3d/CMakeLists.txt
dll/win32/clusapi/CMakeLists.txt
dll/win32/crypt32/CMakeLists.txt
dll/win32/mshtml/CMakeLists.txt
dll/win32/msi/CMakeLists.txt
dll/win32/msrle32/CMakeLists.txt
dll/win32/shell32/CMakeLists.txt
dll/win32/windowscodecs/CMakeLists.txt
dll/win32/winmm/CMakeLists.txt
dll/win32/winmm/midimap/CMakeLists.txt
modules/rostests/winetests/gdiplus/CMakeLists.txt
sdk/lib/3rdparty/freetype/CMakeLists.txt

index 10fd5e3..1c8255a 100644 (file)
@@ -5,6 +5,14 @@ add_definitions(
     -DUSE_WIN32_FILEIO
     -DTIF_PLATFORM_CONSOLE)
 
+if(MSVC)
+    # error C4311: 'type cast': pointer truncation from 'thandle_t' to 'int'
+    replace_compile_flags("/we4311" " ")
+
+    # error C4312: 'type cast': conversion from 'int' to 'thandle_t' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
+
 include_directories(
     ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/libtiff
     ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
index 7c5cb42..efae762 100644 (file)
@@ -3,6 +3,11 @@ add_definitions(
     -D__WINESRC__
     -DDIRECT3D_VERSION=0x0900)
 
+if(MSVC)
+    # error C4133: 'function': incompatible types - from 'D3D_CBUFFER_TYPE *' to 'DWORD *'
+    replace_compile_flags("/we4133" " ")
+endif()
+
 include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(d3dcompiler_43.dll d3dcompiler_43.spec ADD_IMPORTLIB)
 
index 29b337e..6a6bf74 100644 (file)
@@ -7,6 +7,11 @@ add_definitions(
 
 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 
+if(MSVC)
+    # error C4312: 'type cast': conversion from 'LONG' to 'void *' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
+
 # We name this d3dwine.dll, because the Virtualbox additions ship with a custom wined3d.dll
 # and it breaks everything if it is installed.
 spec2def(d3dwine.dll wined3d.spec ADD_IMPORTLIB)
index 6d47465..40cfdd2 100644 (file)
@@ -3,6 +3,11 @@ add_definitions(-D__WINESRC__)
 include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(clusapi.dll clusapi.spec)
 
+if(MSVC)
+    # error C4312: 'type cast': conversion from 'unsigned int' to 'HCLUSTER' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
+
 list(APPEND SOURCE
     clusapi.c
     ${CMAKE_CURRENT_BINARY_DIR}/clusapi_stubs.c
index e53c2f9..b00ef45 100644 (file)
@@ -10,6 +10,11 @@ add_definitions(
 include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(crypt32.dll crypt32.spec ADD_IMPORTLIB)
 
+if(MSVC)
+    # error C4312: 'type cast': conversion from 'unsigned int' to 'void *' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
+
 list(APPEND SOURCE
     base64.c
     cert.c
index e89b34b..08e23da 100644 (file)
@@ -10,6 +10,11 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 add_idl_headers(mshtml_nsiface_header nsiface.idl)
 spec2def(mshtml.dll mshtml.spec ADD_IMPORTLIB)
 
+if(MSVC)
+    # error C4028: formal parameter 3 different from declaration
+    replace_compile_flags("/we4028" " ")
+endif()
+
 list(APPEND SOURCE
     conpoint.c
     dispex.c
index be27062..15697e5 100644 (file)
@@ -7,6 +7,14 @@ add_definitions(-D__WINESRC__ -DMSIRUNMODE=MSIRUNMODE_T)
 spec2def(msi.dll msi.spec ADD_IMPORTLIB)
 generate_idl_iids(msiserver.idl)
 
+if(MSVC)
+    #  error C4133: 'function': incompatible types - from 'UINT *' to 'MSIINSTALLCONTEXT *'
+    replace_compile_flags("/we4133" " ")
+
+    # error C4312: 'type cast': conversion from 'unsigned int' to 'HANDLE' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
+
 list(APPEND SOURCE
     action.c
     alter.c
index 8db9998..0470620 100644 (file)
@@ -3,6 +3,11 @@ add_definitions(-D__WINESRC__)
 include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(msrle32.dll msrle32.spec)
 
+if(MSVC)
+    # error C4312: 'type cast': conversion from 'unsigned int' to 'LPVOID' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
+
 list(APPEND SOURCE
     msrle32.c
     ${CMAKE_CURRENT_BINARY_DIR}/msrle32.def)
index 871e924..60d0fc9 100644 (file)
@@ -12,6 +12,11 @@ if(NOT MSVC)
     add_compile_flags_language("-std=c++11" "CXX")
 endif()
 
+if(MSVC)
+    # error C4311: 'type cast': pointer truncation from 'HANDLE' to 'INT'
+    replace_compile_flags("/we4311" " ")
+endif()
+
 remove_definitions(-D_WIN32_WINNT=0x502)
 add_definitions(-D_WIN32_WINNT=0x600)
 
index 72cea6d..611334a 100644 (file)
@@ -8,6 +8,11 @@ add_definitions(
 remove_definitions(-D_WIN32_WINNT=0x502)
 add_definitions(-D_WIN32_WINNT=0x600)
 
+if(MSVC)
+    # error C4133: 'function': incompatible types - from 'WICPixelFormatNumericRepresentation *' to 'DWORD *'
+    replace_compile_flags("/we4133" " ")
+endif()
+
 include_directories(
     BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine
     ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/libjpeg
index 616680b..8d697b4 100644 (file)
@@ -3,6 +3,11 @@ add_definitions(-D_WINE)
 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(winmm.dll winmm.spec ADD_IMPORTLIB)
 
+if(MSVC)
+    # error C4312: 'type cast': conversion from 'DWORD' to 'HTASK' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
+
 list(APPEND SOURCE
     driver.c
     joystick.c
index 755b220..cc35e2b 100644 (file)
@@ -1,6 +1,11 @@
 
 spec2def(midimap.dll midimap.spec)
 
+if(MSVC)
+    # error C4133: 'function': incompatible types - from 'LPDWORD' to 'DWORD_PTR *'
+    replace_compile_flags("/we4133" " ")
+endif()
+
 add_library(midimap MODULE
     midimap.c
     midimap.rc
index d73d313..151f566 100644 (file)
@@ -1,6 +1,11 @@
 
 add_definitions(-DUSE_WINE_TODOS)
 
+if(MSVC)
+    # error C4133: 'function': incompatible types - from 'ImageFlags *' to 'UINT *'
+    replace_compile_flags("/we4133" " ")
+endif()
+
 list(APPEND SOURCE
     brush.c
     customlinecap.c
index 0f2f5a3..f7e3313 100644 (file)
@@ -5,6 +5,11 @@ add_definitions(
 
 include_directories(include)
 
+if(MSVC)
+    # error C4312: 'type cast': conversion from 'unsigned long' to 'void *' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
+
 list(APPEND SOURCE
     src/autofit/autofit.c
     src/base/ftadvanc.c