mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 07:08:23 +00:00
meson: enable more warnings
This commit is contained in:
parent
a0cc9d1af0
commit
47208072bf
2 changed files with 51 additions and 1 deletions
|
@ -4,10 +4,14 @@ if not dca_dep.found() and cc.has_header_symbol('dca.h', 'dca_init')
|
||||||
dca_dep = cc.find_library('dca', required : false)
|
dca_dep = cc.find_library('dca', required : false)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# autotools didn't use the libdca pkg-config cflags, and they
|
||||||
|
# can point to a non-existing location (/usr/include/dca)
|
||||||
|
no_warn_c_args = ['-Wno-missing-include-dirs']
|
||||||
|
|
||||||
if dca_dep.found()
|
if dca_dep.found()
|
||||||
gstdtsdec = library('gstdtsdec',
|
gstdtsdec = library('gstdtsdec',
|
||||||
'gstdtsdec.c',
|
'gstdtsdec.c',
|
||||||
c_args : gst_plugins_bad_args,
|
c_args : gst_plugins_bad_args + no_warn_c_args,
|
||||||
link_args : noseh_link_args,
|
link_args : noseh_link_args,
|
||||||
include_directories : [configinc, libsinc],
|
include_directories : [configinc, libsinc],
|
||||||
dependencies : [gstaudio_dep, orc_dep, dca_dep],
|
dependencies : [gstaudio_dep, orc_dep, dca_dep],
|
||||||
|
|
46
meson.build
46
meson.build
|
@ -269,6 +269,52 @@ cdata.set_quoted('GST_API_VERSION', api_version)
|
||||||
cdata.set_quoted('GST_LICENSE', 'LGPL')
|
cdata.set_quoted('GST_LICENSE', 'LGPL')
|
||||||
cdata.set_quoted('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
|
cdata.set_quoted('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
|
||||||
|
|
||||||
|
warning_flags = [
|
||||||
|
'-Wmissing-declarations',
|
||||||
|
'-Wredundant-decls',
|
||||||
|
'-Wwrite-strings',
|
||||||
|
'-Wformat',
|
||||||
|
'-Wformat-security',
|
||||||
|
'-Winit-self',
|
||||||
|
'-Wmissing-include-dirs',
|
||||||
|
'-Waddress',
|
||||||
|
'-Wno-multichar',
|
||||||
|
'-Wvla',
|
||||||
|
'-Wpointer-arith',
|
||||||
|
]
|
||||||
|
|
||||||
|
warning_c_flags = [
|
||||||
|
'-Wmissing-prototypes',
|
||||||
|
'-Wdeclaration-after-statement',
|
||||||
|
'-Wold-style-definition',
|
||||||
|
'-Wnested-externs',
|
||||||
|
]
|
||||||
|
|
||||||
|
warning_cxx_flags = [
|
||||||
|
'-Wformat-nonliteral',
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach extra_arg : warning_c_flags
|
||||||
|
if cc.has_argument (extra_arg)
|
||||||
|
add_project_arguments([extra_arg], language: 'c')
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
foreach extra_arg : warning_cxx_flags
|
||||||
|
if cxx.has_argument (extra_arg)
|
||||||
|
add_project_arguments([extra_arg], language: 'cpp')
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
foreach extra_arg : warning_flags
|
||||||
|
if cc.has_argument (extra_arg)
|
||||||
|
add_project_arguments([extra_arg], language: 'c')
|
||||||
|
endif
|
||||||
|
if cxx.has_argument (extra_arg)
|
||||||
|
add_project_arguments([extra_arg], language: 'cpp')
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
# GStreamer package name and origin url
|
# GStreamer package name and origin url
|
||||||
gst_package_name = get_option('with-package-name')
|
gst_package_name = get_option('with-package-name')
|
||||||
if gst_package_name == ''
|
if gst_package_name == ''
|
||||||
|
|
Loading…
Reference in a new issue