[3RDPARTY] Suppress MSVC printf format warnings in 3rd-party code
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 20 Jul 2019 15:34:24 +0000 (17:34 +0200)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 15 Aug 2019 13:24:12 +0000 (15:24 +0200)
base/applications/wordpad/CMakeLists.txt
base/services/nfsd/CMakeLists.txt
dll/3rdparty/libtirpc/CMakeLists.txt
dll/win32/atl/CMakeLists.txt
dll/win32/comctl32/CMakeLists.txt
dll/win32/dbghelp/CMakeLists.txt
modules/rostests/winetests/kernel32/CMakeLists.txt
modules/rostests/winetests/msvcrt/CMakeLists.txt
modules/rostests/winetests/oleacc/CMakeLists.txt
modules/rostests/winetests/user32/CMakeLists.txt

index 652ca7c..80d9117 100644 (file)
@@ -4,6 +4,11 @@ remove_definitions(-D_WIN32_IE=0x600)
 add_definitions(-D__ROS_LONG64__)
 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 
+if (MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 list(APPEND SOURCE
     olecallback.c
     print.c
index 3ab680b..f045152 100644 (file)
@@ -7,6 +7,11 @@ include_directories(
     ${REACTOS_SOURCE_DIR}/drivers/filesystems/nfs
     ${REACTOS_SOURCE_DIR}/dll/np/nfs)
 
+if (MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 list(APPEND SOURCE 
     acl.c
     callback_server.c
index dd636c9..1cadd65 100644 (file)
@@ -9,6 +9,9 @@ include_directories(${REACTOS_SOURCE_DIR}/dll/3rdparty/libtirpc/tirpc)
 if(MSVC)
     # error C4133: '=': incompatible types - from 'char *' to 'int32_t *'
     replace_compile_flags("/we4133" " ")
+
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4313")
 endif()
 
 list(APPEND SOURCE
index 475ebab..ac49211 100644 (file)
@@ -9,6 +9,11 @@ add_definitions(
 include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(atl.dll atl.spec ADD_IMPORTLIB)
 
+if(MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 list(APPEND SOURCE
     atl.c
     atl30.c
index 8c05f33..f6f22da 100644 (file)
@@ -10,6 +10,11 @@ add_definitions(-D_WIN32_WINNT=0x600 -DWINVER=0x600)
 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(comctl32.dll comctl32.spec ADD_IMPORTLIB)
 
+if(MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 list(APPEND SOURCE
     animate.c
     button.c
index 27b44e3..319d38c 100644 (file)
@@ -1,4 +1,9 @@
 
+if(MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 if(NOT CMAKE_CROSSCOMPILING)
     add_definitions(-DDBGHELP_STATIC_LIB)
 
index a33f10d..619e440 100644 (file)
@@ -3,6 +3,11 @@ include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
 add_definitions(-DWINVER=0x600 -D_WIN32_WINNT=0x601)
 
+if(MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 list(APPEND SOURCE
     actctx.c
     atom.c
index c456d9c..359fb2a 100644 (file)
@@ -4,6 +4,11 @@ add_definitions(
     -D_CRT_NONSTDC_NO_DEPRECATE
     -D__msvcrt_ulong=ULONG)
 
+if(MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 list(APPEND SOURCE
     cpp.c
     data.c
index 3118122..5e64591 100644 (file)
@@ -1,4 +1,9 @@
 
+if(MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 add_executable(oleacc_winetest main.c testlist.c)
 set_module_type(oleacc_winetest win32cui)
 target_link_libraries(oleacc_winetest uuid)
index fc73d16..8c6f769 100644 (file)
@@ -2,6 +2,11 @@
 remove_definitions(-DWINVER=0x502 -D_WIN32_WINNT=0x502)
 add_definitions(-DWINVER=0x600 -D_WIN32_WINNT=0x600)
 
+if(MSVC)
+    # Disable warning C4477 (printf format warnings)
+    add_compile_flags("/wd4477")
+endif()
+
 list(APPEND SOURCE
     broadcast.c
     class.c