https://git.reactos.org/?p=reactos.git;a=commitdiff;h=146096cd2e25d1c63d183…
commit 146096cd2e25d1c63d183342875ab0d2938047d8
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Mon Apr 1 17:55:03 2019 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Apr 13 14:07:50 2019 +0200
[3RDPARTY] Make some warnings non-fatal
---
dll/3rdparty/libtiff/CMakeLists.txt | 8 ++++++++
dll/directx/wine/d3dcompiler_43/CMakeLists.txt | 5 +++++
dll/directx/wine/wined3d/CMakeLists.txt | 5 +++++
dll/win32/clusapi/CMakeLists.txt | 5 +++++
dll/win32/crypt32/CMakeLists.txt | 5 +++++
dll/win32/mshtml/CMakeLists.txt | 5 +++++
dll/win32/msi/CMakeLists.txt | 8 ++++++++
dll/win32/msrle32/CMakeLists.txt | 5 +++++
dll/win32/shell32/CMakeLists.txt | 5 +++++
dll/win32/windowscodecs/CMakeLists.txt | 5 +++++
dll/win32/winmm/CMakeLists.txt | 5 +++++
dll/win32/winmm/midimap/CMakeLists.txt | 5 +++++
modules/rostests/winetests/gdiplus/CMakeLists.txt | 5 +++++
sdk/lib/3rdparty/freetype/CMakeLists.txt | 5 +++++
14 files changed, 76 insertions(+)
diff --git a/dll/3rdparty/libtiff/CMakeLists.txt b/dll/3rdparty/libtiff/CMakeLists.txt
index 10fd5e33b06..1c8255a9990 100644
--- a/dll/3rdparty/libtiff/CMakeLists.txt
+++ b/dll/3rdparty/libtiff/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
b/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
index 7c5cb428400..efae762ef65 100644
--- a/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
+++ b/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/wined3d/CMakeLists.txt
b/dll/directx/wine/wined3d/CMakeLists.txt
index 29b337e3bd1..6a6bf74e108 100644
--- a/dll/directx/wine/wined3d/CMakeLists.txt
+++ b/dll/directx/wine/wined3d/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/clusapi/CMakeLists.txt b/dll/win32/clusapi/CMakeLists.txt
index 6d474658c52..40cfdd21f24 100644
--- a/dll/win32/clusapi/CMakeLists.txt
+++ b/dll/win32/clusapi/CMakeLists.txt
@@ -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
diff --git a/dll/win32/crypt32/CMakeLists.txt b/dll/win32/crypt32/CMakeLists.txt
index e53c2f9e3be..b00ef45ed70 100644
--- a/dll/win32/crypt32/CMakeLists.txt
+++ b/dll/win32/crypt32/CMakeLists.txt
@@ -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
diff --git a/dll/win32/mshtml/CMakeLists.txt b/dll/win32/mshtml/CMakeLists.txt
index e89b34b5ae3..08e23da71b4 100644
--- a/dll/win32/mshtml/CMakeLists.txt
+++ b/dll/win32/mshtml/CMakeLists.txt
@@ -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
diff --git a/dll/win32/msi/CMakeLists.txt b/dll/win32/msi/CMakeLists.txt
index be27062273f..15697e5037c 100644
--- a/dll/win32/msi/CMakeLists.txt
+++ b/dll/win32/msi/CMakeLists.txt
@@ -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
diff --git a/dll/win32/msrle32/CMakeLists.txt b/dll/win32/msrle32/CMakeLists.txt
index 8db9998c3bb..04706201560 100644
--- a/dll/win32/msrle32/CMakeLists.txt
+++ b/dll/win32/msrle32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt
index 871e9247031..60d0fc9a3d7 100644
--- a/dll/win32/shell32/CMakeLists.txt
+++ b/dll/win32/shell32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/windowscodecs/CMakeLists.txt
b/dll/win32/windowscodecs/CMakeLists.txt
index 72cea6d42ad..611334ac2d5 100644
--- a/dll/win32/windowscodecs/CMakeLists.txt
+++ b/dll/win32/windowscodecs/CMakeLists.txt
@@ -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
diff --git a/dll/win32/winmm/CMakeLists.txt b/dll/win32/winmm/CMakeLists.txt
index 616680b2ec6..8d697b4e6df 100644
--- a/dll/win32/winmm/CMakeLists.txt
+++ b/dll/win32/winmm/CMakeLists.txt
@@ -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
diff --git a/dll/win32/winmm/midimap/CMakeLists.txt
b/dll/win32/winmm/midimap/CMakeLists.txt
index 755b22018a6..cc35e2b0809 100644
--- a/dll/win32/winmm/midimap/CMakeLists.txt
+++ b/dll/win32/winmm/midimap/CMakeLists.txt
@@ -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
diff --git a/modules/rostests/winetests/gdiplus/CMakeLists.txt
b/modules/rostests/winetests/gdiplus/CMakeLists.txt
index d73d3137ccc..151f56629fb 100644
--- a/modules/rostests/winetests/gdiplus/CMakeLists.txt
+++ b/modules/rostests/winetests/gdiplus/CMakeLists.txt
@@ -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
diff --git a/sdk/lib/3rdparty/freetype/CMakeLists.txt
b/sdk/lib/3rdparty/freetype/CMakeLists.txt
index 0f2f5a34c34..f7e3313c5cd 100644
--- a/sdk/lib/3rdparty/freetype/CMakeLists.txt
+++ b/sdk/lib/3rdparty/freetype/CMakeLists.txt
@@ -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