diff options
author | Heiko Becker <heirecka@exherbo.org> | 2021-04-13 19:54:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 18:54:10 +0100 |
commit | 10bb961f630ee61dc7d0b5ba98df0a9dd80ddb5c (patch) | |
tree | 0730cb99f6c60ade17a38522273d613aec9b2c0e /meson.build | |
parent | f0c288fa0904e694953ec561865ee9672e83e266 (diff) | |
download | libfuse-10bb961f630ee61dc7d0b5ba98df0a9dd80ddb5c.tar.gz |
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 <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>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 13 |
1 files 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 |