Fix a few meson warnings (#596)
authorHeiko Becker <heirecka@exherbo.org>
Tue, 13 Apr 2021 17:54:10 +0000 (19:54 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Apr 2021 17:54:10 +0000 (18:54 +0100)
* Use meson's warning_level instead of passing -Wflags

"-Wall" is included by default and level 2 adds "-Wextra". Avoids a
warning from meson.

Signed-off-by: Heiko Becker <heirecka@exherbo.org>
* Set the C++ language standard through a meson option

Avoids a warning from meson.

Signed-off-by: Heiko Becker <heirecka@exherbo.org>
meson.build

index 1ea28545cc557b651ec47ad8434a4cf76e934613..6feb0a5a5714587a9c33843b672d03501d361f69 100644 (file)
@@ -1,6 +1,10 @@
 project('libfuse3', ['c'], version: '3.10.3',
         meson_version: '>= 0.42',
-        default_options: [ 'buildtype=debugoptimized' ])
+        default_options: [
+            'buildtype=debugoptimized',
+            'cpp_std=c++11',
+            'warning_level=2',
+        ])
 
 
 platform = host_machine.system()
@@ -63,13 +67,12 @@ configure_file(output: 'config.h',
 #
 # Compiler configuration
 #
-add_project_arguments('-D_REENTRANT', '-DHAVE_CONFIG_H', '-Wall', '-Wextra', '-Wno-sign-compare',
+add_project_arguments('-D_REENTRANT', '-DHAVE_CONFIG_H', '-Wno-sign-compare',
                       '-Wstrict-prototypes', '-Wmissing-declarations', '-Wwrite-strings',
                       '-fno-strict-aliasing', language: 'c')
 add_project_arguments('-D_REENTRANT', '-DHAVE_CONFIG_H', '-D_GNU_SOURCE',
-                     '-Wall', '-Wextra', '-Wno-sign-compare', '-std=c++11',
-                     '-Wmissing-declarations', '-Wwrite-strings',
-                     '-fno-strict-aliasing', language: 'cpp')
+                     '-Wno-sign-compare', '-Wmissing-declarations',
+                     '-Wwrite-strings', '-fno-strict-aliasing', language: 'cpp')
 
 # Some (stupid) GCC versions warn about unused return values even when they are
 # casted to void. This makes -Wunused-result pretty useless, since there is no