Skip to content

Commit

Permalink
zstd: fix some meson warnings
Browse files Browse the repository at this point in the history
These are the same changes I applied upstream at facebook/zstd#2746

But we need it here too for our forked meson.build
  • Loading branch information
eli-schwartz committed Jan 31, 2022
1 parent 7182e8f commit 216ecd8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions subprojects/packagefiles/zstd/meson.build
Expand Up @@ -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')
Expand Down Expand Up @@ -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'])
Expand Down

0 comments on commit 216ecd8

Please sign in to comment.