meson: Enable some msvc warnings
authorSeungha Yang <seungha.yang@navercorp.com>
Wed, 23 Oct 2019 07:51:24 +0000 (16:51 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 4 Nov 2019 20:43:18 +0000 (20:43 +0000)
Enable following warnings
 - unused variable
 - unhandled enum value in switch/case

Those warnings might cause build error on CI pipeline, but not enabled
by default. For development environment, let's enable them to save
CI (and developer's time) resource.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-build/issues/31

meson.build

index a6e8dcc..7f7efa4 100644 (file)
@@ -43,6 +43,14 @@ if not meson.is_subproject() and cc.get_id() == 'msvc'
       endif
     endif
   endif
+
+  # Change some warning which belong to level 3 (production quality) or
+  # 4 (informational) to level 1 (severe)
+  add_global_arguments (
+      '/w14062', # enumerator 'identifier' in switch of enum 'enumeration' is not handled
+      '/w14101', # 'identifier' : unreferenced local variable
+      '/w14189', # 'identifier' : local variable is initialized but not referenced
+      language: 'c')
 endif
 
 # Ordered list of subprojects (dict has no ordering guarantees)