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




commit ee6c9bf4e20c95fe25c50511f47728592162ed28
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 8288c91e..0a1d2b3e 100644
--- a/meson.build
+++ b/meson.build
@@ -369,7 +369,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'
@@ -378,7 +382,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]