From 10bb961f630ee61dc7d0b5ba98df0a9dd80ddb5c Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Tue, 13 Apr 2021 19:54:10 +0200 Subject: Fix a few meson warnings (#596) * 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 * Set the C++ language standard through a meson option Avoids a warning from meson. Signed-off-by: Heiko Becker --- meson.build | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 1ea2854..6feb0a5 100644 --- a/meson.build +++ b/meson.build @@ -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 -- cgit v1.2.3