From a834befbc8a0a854d54a8afe7adaf0fa7a4f8ae3 Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Sat, 26 Mar 2022 20:51:39 +0100 Subject: [PATCH] [0.4.11][LIBTIRPC] Mute 30 MSVC2010SP1 x86 dbg warnings C4996, C4101, C4133 CORE-18104 can be observed with MSVC 2010SP1 (16.0.40219.1) This fixes 30 warnings of multiple kind, e.g.: 27 of the kind: C:\047rls\reactos\dll\3rdparty\libtirpc\src\auth_sspi.c(107) : warning C4996: '_strdup': Deprecated POSIX name, Try _strdup instead! and also: C:\047rls\reactos\dll\3rdparty\libtirpc\src\svc_vc.c(315) : warning C4101: 'cleanfds' : unreferenced local variable C:\047rls\reactos\dll\3rdparty\libtirpc\src\svc_vc.c(488) : warning C4101: 'pollfd' : unreferenced local variable C:\047rls\reactos\dll\3rdparty\libtirpc\src\xdr_rec.c(424) : warning C4133: '=' : incompatible types - from 'char *' to 'int32_t *' Muting makes sense for this *3rd party library*. Better than creating more diff within here by addressing them. This leaves no warnings left within this lib. Fix picked from: 0.4.12-dev-803-g 3d3377a5c021899557bd015b09ca8aae9816c075 --- dll/3rdparty/libtirpc/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/3rdparty/libtirpc/CMakeLists.txt b/dll/3rdparty/libtirpc/CMakeLists.txt index 3d028925dee..c1ae1dfbaf1 100644 --- a/dll/3rdparty/libtirpc/CMakeLists.txt +++ b/dll/3rdparty/libtirpc/CMakeLists.txt @@ -2,7 +2,7 @@ spec2def(libtirpc.dll libtirpc/libtirpc.spec ADD_IMPORTLIB) remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) -add_definitions(-DUNICODE -D_WIN32 -DPORTMAP -Dstrdup=_strdup) +add_definitions(-DUNICODE -D_WIN32 -DPORTMAP -Dstrdup=_strdup -D_CRT_NONSTDC_NO_DEPRECATE=1) include_directories(${REACTOS_SOURCE_DIR}/dll/3rdparty/libtirpc/tirpc) @@ -95,6 +95,7 @@ add_library(libtirpc SHARED ${CMAKE_CURRENT_BINARY_DIR}/libtirpc.def) if(MSVC AND (NOT USE_CLANG_CL)) + add_target_compile_flags(libtirpc "/wd4101 /wd4133 /wd4473 /wd4477") else() # FIXME: Tons of warnings. add_target_compile_flags(libtirpc "-w")