From d353ecb6fbdded4ca5849519b74e554266c0164a Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 23 Aug 2021 19:11:42 -0400 Subject: [PATCH] zstd: fix some meson warnings These are the same changes I applied upstream at https://github.com/facebook/zstd/pull/2746 But we need it here too for our forked meson.build --- subprojects/packagefiles/zstd/meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/subprojects/packagefiles/zstd/meson.build b/subprojects/packagefiles/zstd/meson.build index b51b00287..0202d0eed 100644 --- a/subprojects/packagefiles/zstd/meson.build +++ b/subprojects/packagefiles/zstd/meson.build @@ -14,7 +14,11 @@ project('zstd', default_options : [ 'c_std=gnu99', 'cpp_std=c++11', - 'buildtype=release' + 'buildtype=release', + 'warning_level=3', + # -Wdocumentation does not actually pass, nor do the test binaries, + # so this isn't safe + #'werror=true' ], version: '1.4.5', meson_version: '>=0.47.0') @@ -99,10 +103,8 @@ use_lz4 = lz4_dep.found() add_project_arguments('-DXXH_NAMESPACE=ZSTD_', language: ['c']) if [compiler_gcc, compiler_clang].contains(cc_id) - common_warning_flags = [ '-Wextra', '-Wundef', '-Wshadow', '-Wcast-align', '-Wcast-qual' ] + common_warning_flags = [ '-Wundef', '-Wshadow', '-Wcast-align', '-Wcast-qual' ] if cc_id == compiler_clang - # Should use Meson's own --werror build option - #common_warning_flags += '-Werror' common_warning_flags += ['-Wconversion', '-Wno-sign-conversion', '-Wdocumentation'] endif cc_compile_flags = cc.get_supported_arguments(common_warning_flags + ['-Wstrict-prototypes'])