mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
enable more warnings
Fix some warnings
This commit is contained in:
parent
edd019d539
commit
7a29c15628
4 changed files with 26 additions and 7 deletions
22
meson.build
22
meson.build
|
|
@ -2,7 +2,7 @@ project('pipewire', ['c' ],
|
||||||
version : '0.3.2',
|
version : '0.3.2',
|
||||||
license : 'MIT',
|
license : 'MIT',
|
||||||
meson_version : '>= 0.50.0',
|
meson_version : '>= 0.50.0',
|
||||||
default_options : [ 'warning_level=1',
|
default_options : [ 'warning_level=3',
|
||||||
'c_std=gnu99',
|
'c_std=gnu99',
|
||||||
'buildtype=debugoptimized' ])
|
'buildtype=debugoptimized' ])
|
||||||
|
|
||||||
|
|
@ -54,14 +54,28 @@ if cc.get_id() == 'gcc'
|
||||||
'-Wformat-security',
|
'-Wformat-security',
|
||||||
'-Werror=suggest-attribute=format',
|
'-Werror=suggest-attribute=format',
|
||||||
'-Wmissing-braces',
|
'-Wmissing-braces',
|
||||||
'-Wno-missing-field-initializers',
|
|
||||||
'-Wno-unused-parameter',
|
|
||||||
'-Wtype-limits',
|
'-Wtype-limits',
|
||||||
'-Wold-style-declaration',
|
'-Wold-style-declaration',
|
||||||
'-Wvariadic-macros',
|
'-Wvariadic-macros',
|
||||||
# '-DSPA_DEBUG_MEMCPY',
|
'-Wno-missing-field-initializers',
|
||||||
|
'-Wno-unused-parameter',
|
||||||
|
'-Wno-pedantic',
|
||||||
'-DFASTPATH',
|
'-DFASTPATH',
|
||||||
|
# '-DSPA_DEBUG_MEMCPY',
|
||||||
language : 'c')
|
language : 'c')
|
||||||
|
add_global_arguments('-fvisibility=hidden',
|
||||||
|
'-Wsign-compare',
|
||||||
|
'-Wimplicit-fallthrough',
|
||||||
|
'-Wpointer-arith',
|
||||||
|
'-Wformat-security',
|
||||||
|
'-Werror=suggest-attribute=format',
|
||||||
|
'-Wmissing-braces',
|
||||||
|
'-Wtype-limits',
|
||||||
|
'-Wvariadic-macros',
|
||||||
|
'-Wno-missing-field-initializers',
|
||||||
|
'-Wno-unused-parameter',
|
||||||
|
'-Wno-pedantic',
|
||||||
|
language : 'cpp')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
sse_args = '-msse'
|
sse_args = '-msse'
|
||||||
|
|
|
||||||
|
|
@ -563,7 +563,7 @@ spa_pod_builder_addv(struct spa_pod_builder *builder, va_list args)
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
struct spa_pod_frame *f = builder->state.frame;
|
struct spa_pod_frame *f = builder->state.frame;
|
||||||
uint32_t ftype = f ? f->pod.type : SPA_TYPE_None;
|
uint32_t ftype = f ? f->pod.type : (uint32_t)SPA_TYPE_None;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
const char *format;
|
const char *format;
|
||||||
|
|
|
||||||
|
|
@ -445,7 +445,7 @@ do { \
|
||||||
static inline int spa_pod_parser_getv(struct spa_pod_parser *parser, va_list args)
|
static inline int spa_pod_parser_getv(struct spa_pod_parser *parser, va_list args)
|
||||||
{
|
{
|
||||||
struct spa_pod_frame *f = parser->state.frame;
|
struct spa_pod_frame *f = parser->state.frame;
|
||||||
uint32_t ftype = f ? f->pod.type : SPA_TYPE_Struct;
|
uint32_t ftype = f ? f->pod.type : (uint32_t)SPA_TYPE_Struct;
|
||||||
const struct spa_pod_prop *prop = NULL;
|
const struct spa_pod_prop *prop = NULL;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,10 +194,15 @@ clock_disabled:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void unref_queue_item(gpointer data, gpointer user_data)
|
||||||
|
{
|
||||||
|
gst_mini_object_unref(data);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clear_queue (GstPipeWireSrc *pwsrc)
|
clear_queue (GstPipeWireSrc *pwsrc)
|
||||||
{
|
{
|
||||||
g_queue_foreach (&pwsrc->queue, (GFunc) gst_mini_object_unref, NULL);
|
g_queue_foreach (&pwsrc->queue, unref_queue_item, pwsrc);
|
||||||
g_queue_clear (&pwsrc->queue);
|
g_queue_clear (&pwsrc->queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue