https://git.reactos.org/?p=reactos.git;a=commitdiff;h=56334230869d0c5d8028abd0199fdbd067b4aaed

commit 56334230869d0c5d8028abd0199fdbd067b4aaed
Author: Amine Khaldi <[email protected]>
AuthorDate: Thu Dec 7 23:26:59 2017 +0100

    [FREETYPE][PORTCLS][RPCSS][SPOOLSV][STLPORT][USETUP][WLANSVC] Silence some 
clang-cl warnings.
---
 base/services/rpcss/CMakeLists.txt               | 5 +++++
 base/services/wlansvc/CMakeLists.txt             | 4 ++++
 base/setup/usetup/CMakeLists.txt                 | 5 +++++
 drivers/wdm/audio/backpln/portcls/CMakeLists.txt | 4 ++++
 sdk/lib/3rdparty/freetype/CMakeLists.txt         | 4 ++++
 sdk/lib/3rdparty/stlport/CMakeLists.txt          | 6 ++++++
 win32ss/printing/base/spoolsv/CMakeLists.txt     | 5 +++++
 7 files changed, 33 insertions(+)

diff --git a/base/services/rpcss/CMakeLists.txt 
b/base/services/rpcss/CMakeLists.txt
index 0591b005b3..1d429832a8 100644
--- a/base/services/rpcss/CMakeLists.txt
+++ b/base/services/rpcss/CMakeLists.txt
@@ -15,6 +15,11 @@ list(APPEND SOURCE
 
 include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos/wine)
 add_executable(rpcss ${SOURCE} rpcss.rc)
+
+if(USE_CLANG_CL)
+    add_target_compile_flags(rpcss "-Wno-cast-calling-convention")
+endif()
+
 target_link_libraries(rpcss ${PSEH_LIB} wine)
 set_module_type(rpcss win32cui UNICODE)
 add_importlibs(rpcss advapi32 rpcrt4 msvcrt kernel32 ntdll)
diff --git a/base/services/wlansvc/CMakeLists.txt 
b/base/services/wlansvc/CMakeLists.txt
index 11933ba939..f62b8eca9e 100644
--- a/base/services/wlansvc/CMakeLists.txt
+++ b/base/services/wlansvc/CMakeLists.txt
@@ -10,6 +10,10 @@ list(APPEND SOURCE
 
 add_executable(wlansvc ${SOURCE} wlansvc.rc)
 
+if(USE_CLANG_CL)
+    add_target_compile_flags(wlansvc "-Wno-cast-calling-convention")
+endif()
+
 if(NOT MSVC)
     target_link_libraries(wlansvc ${PSEH_LIB})
 endif()
diff --git a/base/setup/usetup/CMakeLists.txt b/base/setup/usetup/CMakeLists.txt
index d90103f16a..5922a4f040 100644
--- a/base/setup/usetup/CMakeLists.txt
+++ b/base/setup/usetup/CMakeLists.txt
@@ -35,6 +35,11 @@ list(APPEND SOURCE
     usetup.h)
 
 add_executable(usetup ${SOURCE} usetup.rc)
+
+if(USE_CLANG_CL)
+    add_target_compile_flags(usetup "-Wno-invalid-source-encoding")
+endif()
+
 target_link_libraries(usetup zlib inflib ext2lib vfatlib)
 set_module_type(usetup nativecui)
 add_importlibs(usetup ntdll)
diff --git a/drivers/wdm/audio/backpln/portcls/CMakeLists.txt 
b/drivers/wdm/audio/backpln/portcls/CMakeLists.txt
index e5f0704776..85660a9e33 100644
--- a/drivers/wdm/audio/backpln/portcls/CMakeLists.txt
+++ b/drivers/wdm/audio/backpln/portcls/CMakeLists.txt
@@ -55,6 +55,10 @@ add_library(portcls SHARED
     portcls.rc
     ${CMAKE_CURRENT_BINARY_DIR}/portcls.def)
 
+if(USE_CLANG_CL)
+    add_target_compile_flags(portcls "-Wno-missing-braces")
+endif()
+
 target_link_libraries(portcls libcntpr ${PSEH_LIB})
 set_module_type(portcls kernelmodedriver ENTRYPOINT 0 )
 add_pch(portcls private.hpp SOURCE)
diff --git a/sdk/lib/3rdparty/freetype/CMakeLists.txt 
b/sdk/lib/3rdparty/freetype/CMakeLists.txt
index 2760d2691e..6a41e3dcf7 100644
--- a/sdk/lib/3rdparty/freetype/CMakeLists.txt
+++ b/sdk/lib/3rdparty/freetype/CMakeLists.txt
@@ -60,3 +60,7 @@ list(APPEND SOURCE
     src/winfonts/winfnt.c)
 
 add_library(freetype ${SOURCE})
+
+if(USE_CLANG_CL)
+    add_target_compile_flags(freetype "-Wno-tautological-constant-compare")
+endif()
diff --git a/sdk/lib/3rdparty/stlport/CMakeLists.txt 
b/sdk/lib/3rdparty/stlport/CMakeLists.txt
index 5210770d02..17c902fdd3 100644
--- a/sdk/lib/3rdparty/stlport/CMakeLists.txt
+++ b/sdk/lib/3rdparty/stlport/CMakeLists.txt
@@ -47,5 +47,11 @@ add_library(stlport
     src/cxa.c
     src/c_locale.c)
 
+if(USE_CLANG_CL)
+    add_target_compile_flags(stlport "-Wno-missing-braces 
-Wno-unused-local-typedef")
+    add_target_compile_flags(stlport "-Wno-infinite-recursion 
-Wno-deprecated-register")
+    add_target_compile_flags(stlport "-Wno-tautological-unsigned-zero-compare")
+endif()
+
 add_dependencies(stlport xdk)
 add_pch(stlport src/stlport_prefix.h SOURCE)
diff --git a/win32ss/printing/base/spoolsv/CMakeLists.txt 
b/win32ss/printing/base/spoolsv/CMakeLists.txt
index 6467f3b583..da7f7b8bf5 100644
--- a/win32ss/printing/base/spoolsv/CMakeLists.txt
+++ b/win32ss/printing/base/spoolsv/CMakeLists.txt
@@ -22,6 +22,11 @@ list(APPEND SOURCE
     ${CMAKE_CURRENT_BINARY_DIR}/winspool_s.c)
 
 add_executable(spoolsv ${SOURCE} spoolsv.rc)
+
+if(USE_CLANG_CL)
+    add_target_compile_flags(spoolsv "-Wno-cast-calling-convention")
+endif()
+
 set_module_type(spoolsv win32cui UNICODE)
 target_link_libraries(spoolsv wine)
 add_delay_importlibs(spoolsv spoolss)

Reply via email to