[0.4.7][WPP] Mute 3 MSVC2010SP1 x86 dbg warnings C4146 CORE-18104
authorJoachim Henze <Joachim.Henze@reactos.org>
Thu, 7 Apr 2022 22:56:20 +0000 (00:56 +0200)
committerJoachim Henze <Joachim.Henze@reactos.org>
Thu, 7 Apr 2022 22:56:20 +0000 (00:56 +0200)
warnings can be observed with MSVC 2010SP1 (16.0.40219.1) x86 target in dbg configuration:
[7441/11751] Building C object sdk\tools\wpp\CMakeFiles\wpp.dir\ppl.yy.c.obj
[7442/11751] Building C object sdk\tools\wpp\CMakeFiles\wpp.dir\ppy.tab.c.obj
ppy.y(402) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
ppy.y(402) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
ppy.y(402) : warning C4146: unary minus operator applied to unsigned type, result still unsigned

partial pick from: 0.4.13-dev-132-g f47f45dbdd68e21ec7ab283877cbd139f418c804

Yes the /wd4244 wasn't really necessary for x86, but only for x64,
but taking it with me as well synced the file to 100%.

sdk/tools/wpp/CMakeLists.txt

index 2539e6b..39f3b2d 100644 (file)
@@ -11,6 +11,13 @@ if(MSVC)
             add_definitions(-Dvsnprintf=_vsnprintf)
         endif()
     endif()
+
+    # Disable warning " unary minus operator applied to unsigned type, result still unsigned"
+    add_compile_flags("/wd4146")
+
+    # Disable warning "'=': conversion from 'a' to 'b', possible loss of data"
+    add_compile_flags("/wd4244")
+
 endif()
 
 if(CMAKE_CROSSCOMPILING)