[gtkmm/meson-msvc-warnings: 2/2] meson.build/MSVC: Disable more warnings




commit b931610fdd193c175b70970d86f2bd729b044702
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon May 23 11:19:39 2022 +0800

    meson.build/MSVC: Disable more warnings
    
    These warnings are not ones that we do need to be worried about when building
    gtkmm, and we should extend applying them for the (generated) C sources as well

 meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index e694d370..fa88e40e 100644
--- a/meson.build
+++ b/meson.build
@@ -291,7 +291,11 @@ if is_msvc
     '/FImsvc_recommended_pragmas.h', # Turn off harmless warnings but make potentially
                                      # dangerous ones glaring, distributed with GLib
     '/EHsc',  # avoid warnings caused by exception handling model used
+    '/wd4152', # nonstandard extension, function/data pointer conversion in expression
+    '/wd4245', # 'argument': conversion from 'int' to 'guint', signed/unsigned mismatch
     '/wd4250', # 'class1' : inherits 'class2::member' via dominance
+    '/wd4702', # unreachable code
+    '/wd4706', # assignment within conditional expression
     '/wd4805' # unsafe mix of type 'type' and type 'type' in operation
   ]
   if host_machine.cpu_family() == 'x86_64' or host_machine.cpu_family() == 'aarch64'
@@ -300,7 +304,7 @@ if is_msvc
   endif
   foreach wd : disable_warnings_list
     disabled_warning = cpp_compiler.get_supported_arguments(wd)
-    add_project_arguments(disabled_warning, language: 'cpp')
+    add_project_arguments(disabled_warning, language: ['cpp', 'c'])
   endforeach
   gui_app_ldflags += '-entry:mainCRTStartup'
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]