mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
meson: enable more warnings
https://bugzilla.gnome.org/show_bug.cgi?id=793960
This commit is contained in:
parent
604c1bfb4e
commit
dc17ac5516
1 changed files with 49 additions and 0 deletions
49
meson.build
49
meson.build
|
@ -116,6 +116,55 @@ core_conf.set('GST_INSTALL_PLUGINS_HELPER', '"/FIXME"')
|
|||
core_conf.set('GST_DATADIR', '"/FIXME"')
|
||||
core_conf.set('GST_LICENSE', '"LGPL"')
|
||||
|
||||
warning_flags = [
|
||||
'-Wmissing-declarations',
|
||||
'-Wredundant-decls',
|
||||
'-Wundef',
|
||||
'-Wwrite-strings',
|
||||
'-Wformat',
|
||||
'-Wformat-nonliteral',
|
||||
'-Wformat-security',
|
||||
'-Winit-self',
|
||||
'-Wmissing-include-dirs',
|
||||
'-Waddress',
|
||||
'-Wno-multichar',
|
||||
'-Wvla',
|
||||
'-Wpointer-arith',
|
||||
]
|
||||
|
||||
warning_c_flags = [
|
||||
'-Wmissing-prototypes',
|
||||
'-Wdeclaration-after-statement',
|
||||
]
|
||||
|
||||
warning_cxx_flags = [
|
||||
'-Waggregate-return',
|
||||
]
|
||||
|
||||
if have_cxx
|
||||
cxx = meson.get_compiler('cpp')
|
||||
foreach extra_arg : warning_cxx_flags
|
||||
if cxx.has_argument (extra_arg)
|
||||
add_project_arguments([extra_arg], language: 'cpp')
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
|
||||
foreach extra_arg : warning_flags
|
||||
if cc.has_argument (extra_arg)
|
||||
add_project_arguments([extra_arg], language: 'c')
|
||||
endif
|
||||
if have_cxx and cxx.has_argument (extra_arg)
|
||||
add_project_arguments([extra_arg], language: 'cpp')
|
||||
endif
|
||||
endforeach
|
||||
|
||||
foreach extra_arg : warning_c_flags
|
||||
if cc.has_argument (extra_arg)
|
||||
add_project_arguments([extra_arg], language: 'c')
|
||||
endif
|
||||
endforeach
|
||||
|
||||
# GStreamer package name and origin url
|
||||
gst_package_name = get_option('with-package-name')
|
||||
if gst_package_name == ''
|
||||
|
|
Loading…
Reference in a new issue