Skip to content
Snippets Groups Projects
Commit af011550 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

Merge branch 'master' into next-lua

parents 879f771d 2f079964
Branches
Tags
No related merge requests found
......@@ -125,7 +125,7 @@ wp_client_update_permissions (WpClient * self, guint n_perm, ...)
g_alloca (n_perm * sizeof (struct pw_permission));
va_start (args, n_perm);
for (gint i = 0; i < n_perm; i++) {
for (guint i = 0; i < n_perm; i++) {
perm[i].id = va_arg (args, guint32);
perm[i].permissions = va_arg (args, guint32);
}
......
......@@ -108,7 +108,7 @@ log_level_index (GLogLevelFlags log_level)
static inline gint
level_index_from_spa (gint spa_lvl)
{
return CLAMP (spa_lvl + 2, 0, G_N_ELEMENTS (log_level_info) - 1);
return CLAMP (spa_lvl + 2, 0, (gint) G_N_ELEMENTS (log_level_info) - 1);
}
static inline gint
......@@ -236,7 +236,7 @@ static inline void
extract_common_fields (struct common_fields *cf, const GLogField *fields,
gsize n_fields)
{
for (gint i = 0; i < n_fields; i++) {
for (guint i = 0; i < n_fields; i++) {
if (g_strcmp0 (fields[i].key, "GLIB_DOMAIN") == 0) {
cf->log_domain = fields[i].value;
}
......@@ -406,7 +406,7 @@ wp_log_structured_standard (
g_log_structured_array (log_level, fields, n_fields);
}
static void
static G_GNUC_PRINTF (6, 0) void
wp_spa_log_logv (void *object,
enum spa_log_level level,
const char *file,
......@@ -436,7 +436,7 @@ wp_spa_log_logv (void *object,
g_log_structured_array (log_level, fields, SPA_N_ELEMENTS (fields));
}
static void
static G_GNUC_PRINTF (6, 7) void
wp_spa_log_log (void *object,
enum spa_log_level level,
const char *file,
......
......@@ -639,9 +639,9 @@ impl_create_link (void *object, const struct spa_dict *props)
/* convert to int - allow unspecified streams */
self_ep_id = wp_proxy_get_bound_id (WP_PROXY (self));
self_stream_id = self_stream ? atoi (self_stream) : SPA_ID_INVALID;
peer_ep_id = atoi (peer_ep);
peer_stream_id = peer_stream ? atoi (peer_stream) : SPA_ID_INVALID;
self_stream_id = self_stream ? (guint32) atoi (self_stream) : SPA_ID_INVALID;
peer_ep_id = (guint32) atoi (peer_ep);
peer_stream_id = peer_stream ? (guint32) atoi (peer_stream) : SPA_ID_INVALID;
/* find our stream */
if (self_stream_id != SPA_ID_INVALID) {
......
......@@ -764,7 +764,7 @@ wp_object_interest_matches_full (WpObjectInterest * self,
switch (c->type) {
case WP_CONSTRAINT_TYPE_PW_PROPERTY:
lookup_props = pw_props;
/* G_GNUC_FALLTHROUGH */;
SPA_FALLTHROUGH;
case WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY: {
const gchar *lookup_str = NULL;
......
......@@ -561,7 +561,7 @@ static gboolean
wp_object_manager_is_interested_in_object (WpObjectManager * self,
GObject * object)
{
gint i;
guint i;
WpObjectInterest *interest = NULL;
for (i = 0; i < self->interests->len; i++) {
......@@ -576,7 +576,7 @@ static gboolean
wp_object_manager_is_interested_in_global (WpObjectManager * self,
WpGlobal * global, WpObjectFeatures * wanted_features)
{
gint i;
guint i;
WpObjectInterest *interest = NULL;
for (i = 0; i < self->interests->len; i++) {
......@@ -824,7 +824,7 @@ find_proxy_instance_type (const char * type, guint32 version)
children = g_type_children (WP_TYPE_GLOBAL_PROXY, &n_children);
for (gint i = 0; i < n_children; i++) {
for (guint i = 0; i < n_children; i++) {
WpProxyClass *klass = (WpProxyClass *) g_type_class_ref (children[i]);
if (g_strcmp0 (klass->pw_iface_type, type) == 0 &&
klass->pw_iface_version == version) {
......
......@@ -131,7 +131,7 @@ gint wp_properties_setf (WpProperties * self, const gchar * key,
WP_API
gint wp_properties_setf_valist (WpProperties * self, const gchar * key,
const gchar * format, va_list args);
const gchar * format, va_list args) G_GNUC_PRINTF(3, 0);
/* iterate */
......
......@@ -59,15 +59,29 @@ build_gir = gir.found()
wp_lib_include_dir = include_directories('lib')
common_flags = [
'-fvisibility=hidden',
'-Wsuggest-attribute=format',
'-Wsign-compare',
'-Wpointer-arith',
'-Wpointer-sign',
'-Wformat',
'-Wformat-security',
'-Wimplicit-fallthrough',
'-Wmissing-braces',
'-Wtype-limits',
'-Wvariadic-macros',
'-Wno-missing-field-initializers',
'-Wno-unused-parameter',
'-Wno-pedantic',
'-Wold-style-declaration',
'-Wunused-result',
]
cc = meson.get_compiler('c')
if cc.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'c')
endif
add_project_arguments(cc.get_supported_arguments(common_flags), language: 'c')
ccpp = meson.get_compiler('cpp')
if ccpp.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'cpp')
endif
add_project_arguments(ccpp.get_supported_arguments(common_flags), language: 'cpp')
have_audiofade = cc.compiles('''
#include <spa/utils/names.h>
......
......@@ -666,7 +666,7 @@ wireplumber__module_init (WpModule * module, WpCore * core, GVariant * args)
if (g_variant_lookup (value, "flags", "as", &flags_iter)) {
const gchar *flag_str = NULL;
while (g_variant_iter_loop (flags_iter, "&s", &flag_str)) {
for (gint i = 0; i < SPA_N_ELEMENTS (flag_names); i++) {
for (guint i = 0; i < SPA_N_ELEMENTS (flag_names); i++) {
if (!g_strcmp0 (flag_str, flag_names[i].name))
flags |= flag_names[i].flag;
}
......
......@@ -464,11 +464,10 @@ static void
abort_acquisition (WpSessionItem * ac, GTask *task, const gchar *msg)
{
g_autoptr (WpGlobalProxy) link = NULL;
GError *e = NULL;
/* return error to abort the link activation */
e = g_error_new (WP_DOMAIN_LIBRARY, WP_LIBRARY_ERROR_OPERATION_FAILED, msg);
g_task_return_error (task, e);
g_task_return_new_error (task, WP_DOMAIN_LIBRARY,
WP_LIBRARY_ERROR_OPERATION_FAILED, "%s", msg);
/* destroy the link */
link = wp_session_item_get_associated_proxy (ac, WP_TYPE_ENDPOINT_LINK);
......
......@@ -7,7 +7,7 @@ properties = [
[endpoint]
session = "audio"
type = "si-adapter"
streams = "audio-sink.streams"
#streams = "audio-sink.streams"
[endpoint.config]
enable-monitor = true
......@@ -8,7 +8,7 @@ properties = [
[endpoint]
session = "audio"
type = "si-adapter"
streams = "audio-sink.streams"
#streams = "audio-sink.streams"
[endpoint.config]
priority = 1
......
......@@ -8,7 +8,7 @@ properties = [
[endpoint]
session = "audio"
type = "si-adapter"
streams = "audio-sink.streams"
#streams = "audio-sink.streams"
[endpoint.config]
priority = 5
......
......@@ -41,7 +41,7 @@ struct WpDaemonData
guint n_sessions_exported;
};
static void
static G_GNUC_PRINTF (3, 4) void
daemon_exit (struct WpDaemonData * d, gint code, const gchar *format, ...)
{
va_list args;
......@@ -311,17 +311,20 @@ parse_commands_file (struct WpDaemonData *d, GInputStream * stream,
/* reached the end of the data that was read */
if (cur - linestart >= sizeof (buffer)) {
if (cur - linestart >= (gssize) sizeof (buffer)) {
g_set_error (error, WP_DOMAIN_DAEMON, WP_CODE_OPERATION_FAILED,
"line %i exceeds the maximum allowed line size (%d bytes)",
lineno, (gint) sizeof (buffer));
return FALSE;
} else if (cur - linestart > 0) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
/* we have unparsed data, move it to the
* beginning of the buffer and continue */
strncpy (buffer, linestart, cur - linestart);
linestart = buffer;
cur = buffer + (cur - linestart);
#pragma GCC diagnostic pop
} else {
/* reset for the next g_input_stream_read() call */
linestart = cur = buffer;
......
......@@ -226,7 +226,7 @@ on_state_changed (WpEndpointLink *ep_link, WpEndpointLinkState old_state,
case WP_ENDPOINT_LINK_STATE_ACTIVE:
break;
case WP_ENDPOINT_LINK_STATE_ERROR:
wp_message_object ("link failed: %s", error);
wp_warning ("link failed: %s", error);
g_test_fail ();
case WP_ENDPOINT_LINK_STATE_INACTIVE:
case WP_ENDPOINT_LINK_STATE_PREPARING:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment