diff --git a/cdbus/helpers.c b/cdbus/helpers.c index 52fbbb0c..02b859a1 100644 --- a/cdbus/helpers.c +++ b/cdbus/helpers.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2008,2009,2010,2011 Nedko Arnaudov + * Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov * Copyright (C) 2008 Juuso Alasuutari * ************************************************************************** @@ -34,8 +34,7 @@ #include "helpers.h" #include "method.h" -#include "../log.h" -#include "../assert.h" +#include "../common.h" #include "../common/klist.h" /* D-Bus versions earlier than 1.4.12 dont define DBUS_TIMEOUT_INFINITE */ @@ -765,7 +764,7 @@ find_signal_hook_descriptor( static DBusHandlerResult cdbus_signal_handler( - DBusConnection * connection_ptr, + DBusConnection * UNUSED(connection_ptr), DBusMessage * message_ptr, void * data) { diff --git a/cdbus/object_path.c b/cdbus/object_path.c index 07667952..c699cafe 100644 --- a/cdbus/object_path.c +++ b/cdbus/object_path.c @@ -161,7 +161,11 @@ void cdbus_introspection_destroy(struct cdbus_object_path *path) } } -static bool cdbus_introspection_handler(const struct cdbus_interface_descriptor * interface, struct cdbus_method_call * call_ptr) +static +bool +cdbus_introspection_handler( + const struct cdbus_interface_descriptor * UNUSED(interface), + struct cdbus_method_call * call_ptr) { if (strcmp(call_ptr->method_name, "Introspect") != 0) { @@ -401,7 +405,7 @@ handled: return DBUS_HANDLER_RESULT_HANDLED; } -static void cdbus_object_path_handler_unregister(DBusConnection * connection_ptr, void * data) +static void cdbus_object_path_handler_unregister(DBusConnection * UNUSED(connection_ptr), void * data) { log_debug("Message handler of object path %s was unregistered", (opath_ptr && opath_ptr->name) ? opath_ptr->name : ""); } diff --git a/common.h b/common.h index f92b126c..ffbc3ba2 100644 --- a/common.h +++ b/common.h @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2009,2011 Nedko Arnaudov + * Copyright (C) 2009,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains stuff that is needed almost everywhere in ladish @@ -57,5 +57,6 @@ extern const char * g_app_L2_js_constant; const char * ladish_map_app_level_constant(const char * level); #define LADISH_PUBLIC __attribute__ ((visibility ("default"))) +#define UNUSED(x) UNUSED_ ## x __attribute__((unused)) #endif /* #ifndef COMMON_H__82C9504A_ACD2_435D_9743_781943473E6A__INCLUDED */ diff --git a/common/log.c b/common/log.c index 3c07b51b..373680e0 100644 --- a/common/log.c +++ b/common/log.c @@ -168,9 +168,9 @@ static bool ladish_log_enabled( unsigned int level, - const char * file, - unsigned int line, - const char * func) + const char * UNUSED(file), + unsigned int UNUSED(line), + const char * UNUSED(func)) { return level != LADISH_LOG_LEVEL_DEBUG; } diff --git a/conf.c b/conf.c index 7ae47944..6d1d1842 100644 --- a/conf.c +++ b/conf.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010,2011 Nedko Arnaudov + * Copyright (C) 2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of the settings storage @@ -147,7 +147,7 @@ bool install_term_signal_handler(int signum, bool ignore_if_already_ignored) return true; } -int main(int argc, char ** argv) +int main(int UNUSED(argc), char ** UNUSED(argv)) { if (getenv("HOME") == NULL) { diff --git a/daemon/check_integrity.c b/daemon/check_integrity.c index 70df1ec0..de15078b 100644 --- a/daemon/check_integrity.c +++ b/daemon/check_integrity.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010 Nedko Arnaudov + * Copyright (C) 2010,2012 Nedko Arnaudov * ************************************************************************** * This file contains the code that checks data integrity @@ -45,12 +45,12 @@ static void ladish_check_integrity_fail(const char * message) bool ladish_check_vgraph_integrity_client_begin_callback( - void * context, - ladish_graph_handle graph_handle, - bool hidden, - ladish_client_handle client_handle, - const char * client_name, - void ** client_iteration_context_ptr_ptr) + void * UNUSED(context), + ladish_graph_handle UNUSED(graph_handle), + bool UNUSED(hidden), + ladish_client_handle UNUSED(client_handle), + const char * UNUSED(client_name), + void ** UNUSED(client_iteration_context_ptr_ptr)) { return true; } @@ -59,9 +59,9 @@ bool ladish_check_vgraph_integrity_port_callback( void * context, ladish_graph_handle vgraph, - bool hidden, - void * client_iteration_context_ptr, - ladish_client_handle client_handle, + bool UNUSED(hidden), + void * UNUSED(client_iteration_context_ptr), + ladish_client_handle UNUSED(client_handle), const char * client_name, ladish_port_handle vport, const char * port_name, @@ -100,19 +100,23 @@ ladish_check_vgraph_integrity_port_callback( bool ladish_check_vgraph_integrity_client_end_callback( - void * context, - ladish_graph_handle graph_handle, - bool hidden, - ladish_client_handle client_handle, - const char * client_name, - void * client_iteration_context_ptr) + void * UNUSED(context), + ladish_graph_handle UNUSED(graph_handle), + bool UNUSED(hidden), + ladish_client_handle UNUSED(client_handle), + const char * UNUSED(client_name), + void * UNUSED(client_iteration_context_ptr)) { return true; } #undef ctx_ptr -bool ladish_check_vgraph_integrity(void * context, ladish_graph_handle graph, ladish_app_supervisor_handle app_supervisor) +bool +ladish_check_vgraph_integrity( + void * context, + ladish_graph_handle graph, + ladish_app_supervisor_handle UNUSED(app_supervisor)) { ladish_graph_iterate_nodes( graph, diff --git a/daemon/cmd_change_app_state.c b/daemon/cmd_change_app_state.c index 5c09ebb0..f895b2a8 100644 --- a/daemon/cmd_change_app_state.c +++ b/daemon/cmd_change_app_state.c @@ -70,7 +70,12 @@ static bool run_target_start(struct ladish_command_change_app_state * cmd_ptr, l return true; } -static bool run_target_stop(struct ladish_command_change_app_state * cmd_ptr, ladish_app_supervisor_handle supervisor, ladish_app_handle app) +static +bool +run_target_stop( + struct ladish_command_change_app_state * cmd_ptr, + ladish_app_supervisor_handle UNUSED(supervisor), + ladish_app_handle app) { const char * app_name; uuid_t app_uuid; diff --git a/daemon/cmd_load_studio.c b/daemon/cmd_load_studio.c index b0699b64..c43c0962 100644 --- a/daemon/cmd_load_studio.c +++ b/daemon/cmd_load_studio.c @@ -672,7 +672,7 @@ free: return; } -static void callback_elend(void * data, const char * el) +static void callback_elend(void * data, const char * UNUSED(el)) { char * src; char * dst; diff --git a/daemon/cmd_stop_studio.c b/daemon/cmd_stop_studio.c index babf9ef8..ecf816fa 100644 --- a/daemon/cmd_stop_studio.c +++ b/daemon/cmd_stop_studio.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2009,2010,2011 Nedko Arnaudov + * Copyright (C) 2009,2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of the "stop studio" command @@ -44,13 +44,13 @@ struct ladish_command_stop_studio unsigned int stop_state; }; -static bool stop_room(void * context, ladish_room_handle room) +static bool stop_room(void * UNUSED(context), ladish_room_handle room) { ladish_room_initiate_stop(room, false); return true; } -static bool room_stopped(void * context, ladish_room_handle room) +static bool room_stopped(void * UNUSED(context), ladish_room_handle room) { return ladish_room_stopped(room); } @@ -81,7 +81,7 @@ static bool run(void * context) cmd_ptr->command.state = LADISH_COMMAND_STATE_WAITING; cmd_ptr->stop_state = STOP_STATE_WAITING_FOR_ROOM_STOP; - if (!ladish_studio_iterate_rooms(ladish_studio_get_virtualizer(), stop_room)) + if (!ladish_studio_iterate_rooms(NULL, stop_room)) { log_error("room stop initiation failed"); return false; @@ -91,7 +91,7 @@ static bool run(void * context) case LADISH_COMMAND_STATE_WAITING: if (cmd_ptr->stop_state == STOP_STATE_WAITING_FOR_ROOM_STOP) { - if (!ladish_studio_iterate_rooms(ladish_studio_get_virtualizer(), room_stopped)) + if (!ladish_studio_iterate_rooms(NULL, room_stopped)) { return true; } diff --git a/daemon/control.c b/daemon/control.c index db9a8f45..9d2ab142 100644 --- a/daemon/control.c +++ b/daemon/control.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2008,2009,2010,2011 Nedko Arnaudov + * Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov * Copyright (C) 2008 Juuso Alasuutari * ************************************************************************** @@ -544,7 +544,7 @@ fail: #define array_iter_ptr ((DBusMessageIter *)context) -static bool get_studio_list_callback(void * call_ptr, void * context, const char * studio, uint32_t modtime) +static bool get_studio_list_callback(void * UNUSED(call_ptr), void * context, const char * studio, uint32_t modtime) { DBusMessageIter struct_iter; DBusMessageIter dict_iter; diff --git a/daemon/graph.c b/daemon/graph.c index 2c7d791b..93d246f1 100644 --- a/daemon/graph.c +++ b/daemon/graph.c @@ -1303,16 +1303,16 @@ bool ladish_graph_client_looks_empty_internal(struct ladish_graph * graph_ptr, s port_ptr = list_entry(node_ptr, struct ladish_graph_port, siblings_client); if (!port_ptr->hidden) { - //log_info("port '%s' is visible, client '%s' does not look empty", port_ptr->name, client_ptr->name); + log_debug("port '%s' is visible, client '%s' does not look empty", port_ptr->name, client_ptr->name); return false; } else { - //log_info("port '%s' is invisible", port_ptr->name); + log_debug("port '%s' is invisible", port_ptr->name); } } - //log_info("client '%s' looks empty in graph %s", client_ptr->name, graph_ptr->opath != NULL ? graph_ptr->opath : "JACK"); + log_debug("client '%s' looks empty in graph %s", client_ptr->name, graph_ptr->opath != NULL ? graph_ptr->opath : "JACK"); return true; } @@ -2975,9 +2975,9 @@ void ladish_graph_trick_dicts(ladish_graph_handle graph_handle) static bool ladish_graph_copy_client_begin_callback( - void * context, + void * UNUSED(context), ladish_graph_handle graph_handle, - bool hidden, + bool UNUSED(hidden), ladish_client_handle client_handle, const char * client_name, void ** client_iteration_context_ptr_ptr) @@ -2989,7 +2989,7 @@ ladish_graph_copy_client_begin_callback( return false; } - if (!ladish_graph_add_client(context, copy, client_name, false)) + if (!ladish_graph_add_client(graph_handle, copy, client_name, false)) { ladish_client_destroy(copy); return false; @@ -3003,12 +3003,12 @@ ladish_graph_copy_client_begin_callback( static bool ladish_graph_copy_port_callback( - void * context, + void * UNUSED(context), ladish_graph_handle graph_handle, - bool hidden, + bool UNUSED(hidden), void * client_iteration_context_ptr, - ladish_client_handle client_handle, - const char * client_name, + ladish_client_handle UNUSED(client_handle), + const char * UNUSED(client_name), ladish_port_handle port_handle, const char * port_name, uint32_t port_type, @@ -3021,7 +3021,7 @@ ladish_graph_copy_port_callback( return false; } - if (!ladish_graph_add_port(context, client_iteration_context_ptr, copy, port_name, port_type, port_flags, true)) + if (!ladish_graph_add_port(graph_handle, client_iteration_context_ptr, copy, port_name, port_type, port_flags, true)) { ladish_port_destroy(copy); return false; diff --git a/daemon/jack_session.c b/daemon/jack_session.c index d25a3599..8b5f2fb9 100644 --- a/daemon/jack_session.c +++ b/daemon/jack_session.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2011 Nedko Arnaudov + * Copyright (C) 2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains interface to jack session helper functionality @@ -45,11 +45,11 @@ struct ladish_js_find_app_client_context bool ladish_js_find_app_client_callback( void * context, - ladish_graph_handle graph_handle, + ladish_graph_handle UNUSED(graph_handle), bool hidden, ladish_client_handle client_handle, const char * client_name, - void ** client_iteration_context_ptr_ptr) + void ** UNUSED(client_iteration_context_ptr_ptr)) { bool has_callback; const char * jack_name; diff --git a/daemon/load.c b/daemon/load.c index 3d824134..8d5d8b0b 100644 --- a/daemon/load.c +++ b/daemon/load.c @@ -286,11 +286,11 @@ static bool interlink_client( void * context, - ladish_graph_handle graph_handle, - bool hidden, + ladish_graph_handle UNUSED(graph_handle), + bool UNUSED(hidden), ladish_client_handle jclient, const char * name, - void ** client_iteration_context_ptr_ptr) + void ** UNUSED(client_iteration_context_ptr_ptr)) { uuid_t app_uuid; uuid_t vclient_app_uuid; @@ -383,16 +383,16 @@ interlink_client( bool interlink_port( - void * context, - ladish_graph_handle graph_handle, - bool hidden, - void * client_iteration_context_ptr, + void * UNUSED(context), + ladish_graph_handle UNUSED(graph_handle), + bool UNUSED(hidden), + void * UNUSED(client_iteration_context_ptr), ladish_client_handle client_handle, - const char * client_name, + const char * UNUSED(client_name), ladish_port_handle port_handle, - const char * port_name, - uint32_t port_type, - uint32_t port_flags) + const char * UNUSED(port_name), + uint32_t UNUSED(port_type), + uint32_t UNUSED(port_flags)) { uuid_t app_uuid; diff --git a/daemon/loader.c b/daemon/loader.c index c2e797a1..b291cd93 100644 --- a/daemon/loader.c +++ b/daemon/loader.c @@ -164,6 +164,8 @@ static void loader_sigchld_handler(int signum) struct loader_child *child_ptr; int signal; + ASSERT(signum == SIGCHLD); + while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { child_ptr = loader_child_find(pid); diff --git a/daemon/main.c b/daemon/main.c index 67ddc8f7..6adf320f 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2008,2009,2010,2011 Nedko Arnaudov + * Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov * Copyright (C) 2008 Juuso Alasuutari * Copyright (C) 2002 Robert Ham * @@ -250,7 +250,7 @@ void uninit_paths(void) free(g_base_dir); } -static void on_conf_notify_changed(void * context, const char * key, const char * value) +static void on_conf_notify_changed(void * UNUSED(context), const char * UNUSED(key), const char * value) { bool notify_enable; diff --git a/daemon/proctitle.c b/daemon/proctitle.c index 941bf22e..d0d586fd 100644 --- a/daemon/proctitle.c +++ b/daemon/proctitle.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2008, 2009 Nedko Arnaudov + * Copyright (C) 2008,2009,2012 Nedko Arnaudov * ************************************************************************** * This file contains the code that sets process "title" @@ -29,7 +29,7 @@ #include #include -#include "../log.h" +#include "../common.h" static char * g_argv_begin; static char * g_argv_end; @@ -38,7 +38,7 @@ void lash_init_setproctitle( int argc, char ** argv, - char ** envp) + char ** UNUSED(envp)) { char * last_arg; diff --git a/daemon/room.c b/daemon/room.c index 7d6bcfc0..ac97ec7d 100644 --- a/daemon/room.c +++ b/daemon/room.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010, 2011 Nedko Arnaudov + * Copyright (C) 2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains the core parts of room object implementation @@ -162,7 +162,7 @@ bool create_port_link( void * context, ladish_port_handle port_handle, - const char * port_name, + const char * UNUSED(port_name), uint32_t port_type, uint32_t port_flags) { @@ -207,15 +207,15 @@ static bool destroy_port_link( void * context, - ladish_graph_handle graph_handle, - bool hidden, - void * client_iteration_context_ptr, - ladish_client_handle client_handle, - const char * client_name, + ladish_graph_handle UNUSED(graph_handle), + bool UNUSED(hidden), + void * UNUSED(client_iteration_context_ptr), + ladish_client_handle UNUSED(client_handle), + const char * UNUSED(client_name), ladish_port_handle port_handle, const char * port_name, - uint32_t port_type, - uint32_t port_flags) + uint32_t UNUSED(port_type), + uint32_t UNUSED(port_flags)) { uuid_t uuid_in_room; char uuid_in_room_str[37]; @@ -472,11 +472,11 @@ struct ladish_room_iterate_link_ports_context static bool ladish_room_iterate_link_ports_client_callback( - void * context, - ladish_graph_handle graph_handle, - bool hidden, + void * UNUSED(context), + ladish_graph_handle UNUSED(graph_handle), + bool UNUSED(hidden), ladish_client_handle client_handle, - const char * client_name, + const char * UNUSED(client_name), void ** client_iteration_context_ptr_ptr) { uuid_t uuid; @@ -500,11 +500,11 @@ static bool ladish_room_iterate_link_ports_port_callback( void * context, - ladish_graph_handle graph_handle, - bool hidden, + ladish_graph_handle UNUSED(graph_handle), + bool UNUSED(hidden), void * client_iteration_context_ptr, - ladish_client_handle client_handle, - const char * client_name, + ladish_client_handle UNUSED(client_handle), + const char * UNUSED(client_name), ladish_port_handle port_handle, const char * port_name, uint32_t port_type, @@ -615,12 +615,12 @@ bool ladish_room_stopped(ladish_room_handle room_handle) static bool ladish_room_app_is_stopped( - void * context, + void * UNUSED(context), const char * name, - bool running, - const char * command, - bool terminal, - const char * level, + bool UNUSED(running), + const char * UNUSED(command), + bool UNUSED(terminal), + const char * UNUSED(level), pid_t pid, const uuid_t uuid) { @@ -642,13 +642,13 @@ ladish_room_app_is_stopped( static bool ladish_remove_room_app( - void * context, + void * UNUSED(context), const char * name, - bool running, - const char * command, - bool terminal, - const char * level, - pid_t pid, + bool UNUSED(running), + const char * UNUSED(command), + bool UNUSED(terminal), + const char * UNUSED(level), + pid_t UNUSED(pid), const uuid_t uuid) { ladish_virtualizer_remove_app(ladish_studio_get_jack_graph(), uuid, name); diff --git a/daemon/room_load.c b/daemon/room_load.c index 865233f3..de00a3ab 100644 --- a/daemon/room_load.c +++ b/daemon/room_load.c @@ -670,7 +670,7 @@ free: free(name_dup); } -static void callback_elend(void * data, const char * el) +static void callback_elend(void * data, const char * UNUSED(el)) { if (context_ptr->error) { diff --git a/daemon/save.c b/daemon/save.c index b554226b..f9dbbc5d 100644 --- a/daemon/save.c +++ b/daemon/save.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010, 2011 Nedko Arnaudov + * Copyright (C) 2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation save releated helper functions @@ -38,7 +38,12 @@ struct ladish_write_vgraph_context bool client_visible; }; -static bool is_hidden_port_interesting(ladish_app_supervisor_handle app_supervisor, ladish_client_handle client, ladish_port_handle port) +static +bool +is_hidden_port_interesting( + ladish_app_supervisor_handle app_supervisor, + ladish_client_handle UNUSED(client), + ladish_port_handle port) { uuid_t app_uuid; ladish_app_handle app; @@ -130,7 +135,12 @@ bool ladish_write_string_escape(int fd, const char * string) return ladish_write_string_escape_ex(fd, string, LADISH_ESCAPE_FLAG_ALL); } -static bool ladish_port_dict_ignored_keys_check(void * context, const char * key, const char * value) +static +bool +ladish_port_dict_ignored_keys_check( + void * UNUSED(context), + const char * key, + const char * UNUSED(value)) { return strcmp(key, URI_A2J_PORT) == 0; } @@ -374,11 +384,11 @@ static bool ladish_save_vgraph_client_begin( void * context, - ladish_graph_handle graph, + ladish_graph_handle UNUSED(graph), bool hidden, ladish_client_handle client_handle, const char * client_name, - void ** client_iteration_context_ptr_ptr) + void ** UNUSED(client_iteration_context_ptr_ptr)) { uuid_t uuid; char str[37]; @@ -471,11 +481,11 @@ static bool ladish_save_vgraph_client_end( void * context, - ladish_graph_handle graph, - bool hidden, + ladish_graph_handle UNUSED(graph), + bool UNUSED(hidden), ladish_client_handle client_handle, - const char * client_name, - void * client_iteration_context_ptr) + const char * UNUSED(client_name), + void * UNUSED(client_iteration_context_ptr)) { if (!ctx_ptr->client_visible) { @@ -533,7 +543,7 @@ ladish_save_vgraph_port( void * context, ladish_graph_handle graph, bool hidden, - void * client_iteration_context_ptr, + void * UNUSED(client_iteration_context_ptr), ladish_client_handle client_handle, const char * client_name, ladish_port_handle port_handle, @@ -746,7 +756,7 @@ ladish_save_app( const char * command, bool terminal, const char * level, - pid_t pid, + pid_t UNUSED(pid), const uuid_t uuid) { const char * unescaped_string; @@ -985,11 +995,11 @@ static bool ladish_save_jack_client_begin( void * context, - ladish_graph_handle graph_handle, + ladish_graph_handle UNUSED(graph_handle), bool hidden, ladish_client_handle client_handle, const char * client_name, - void ** client_iteration_context_ptr_ptr) + void ** UNUSED(client_iteration_context_ptr_ptr)) { void * vgraph; @@ -1017,11 +1027,11 @@ static bool ladish_save_jack_client_end( void * context, - ladish_graph_handle graph_handle, - bool hidden, - ladish_client_handle client_handle, - const char * client_name, - void * client_iteration_context_ptr) + ladish_graph_handle UNUSED(graph_handle), + bool UNUSED(hidden), + ladish_client_handle UNUSED(client_handle), + const char * UNUSED(client_name), + void * UNUSED(client_iteration_context_ptr)) { if (!ctx_ptr->client_visible) { @@ -1045,15 +1055,15 @@ static bool ladish_save_jack_port( void * context, - ladish_graph_handle graph_handle, + ladish_graph_handle UNUSED(graph_handle), bool hidden, - void * client_iteration_context_ptr, + void * UNUSED(client_iteration_context_ptr), ladish_client_handle client_handle, const char * client_name, ladish_port_handle port_handle, const char * port_name, - uint32_t port_type, - uint32_t port_flags) + uint32_t UNUSED(port_type), + uint32_t UNUSED(port_flags)) { uuid_t uuid; char str[37]; diff --git a/daemon/studio.c b/daemon/studio.c index fcbbd8ec..c336db7b 100644 --- a/daemon/studio.c +++ b/daemon/studio.c @@ -319,7 +319,7 @@ bool ladish_studio_set_graph_connection_handlers( void * context, ladish_graph_handle graph, - ladish_app_supervisor_handle app_supervisor) + ladish_app_supervisor_handle UNUSED(app_supervisor)) { ladish_virtualizer_set_graph_connection_handlers(context, graph); return true; /* iterate all graphs */ @@ -399,7 +399,12 @@ void ladish_studio_handle_unexpected_jack_server_stop(void) /* TODO: if user wants, restart jack server and reconnect all jack apps to it */ } -static bool ladish_studio_hide_vgraph_non_virtual(void * context, ladish_graph_handle graph, ladish_app_supervisor_handle app_supervisor) +static +bool +ladish_studio_hide_vgraph_non_virtual( + void * UNUSED(context), + ladish_graph_handle graph, + ladish_app_supervisor_handle UNUSED(app_supervisor)) { ladish_graph_hide_non_virtual(graph); return true; /* iterate all vgraphs */ @@ -665,7 +670,7 @@ static bool ladish_studio_on_child_exit_callback( void * context, - ladish_graph_handle graph, + ladish_graph_handle UNUSED(graph), ladish_app_supervisor_handle app_supervisor) { child_exit_context_ptr->found = ladish_app_supervisor_child_exit(app_supervisor, child_exit_context_ptr->pid, child_exit_context_ptr->exit_status); @@ -947,7 +952,12 @@ bool ladish_studio_has_rooms(void) return !list_empty(&g_studio.rooms); } -static bool ladish_studio_stop_app_supervisor(void * context, ladish_graph_handle graph, ladish_app_supervisor_handle app_supervisor) +static +bool +ladish_studio_stop_app_supervisor( + void * UNUSED(context), + ladish_graph_handle UNUSED(graph), + ladish_app_supervisor_handle app_supervisor) { ladish_app_supervisor_stop(app_supervisor); return true; /* iterate all supervisors */ diff --git a/daemon/virtualizer.c b/daemon/virtualizer.c index f02cc3ff..dfa25aa2 100644 --- a/daemon/virtualizer.c +++ b/daemon/virtualizer.c @@ -137,7 +137,12 @@ struct find_link_port_context #define find_link_port_context_ptr ((struct find_link_port_context *)context) -static bool find_link_port_vgraph_callback_by_uuid(void * context, ladish_graph_handle graph, ladish_app_supervisor_handle app_supervisor) +static +bool +find_link_port_vgraph_callback_by_uuid( + void * context, + ladish_graph_handle graph, + ladish_app_supervisor_handle UNUSED(app_supervisor)) { ladish_port_handle port; @@ -152,7 +157,12 @@ static bool find_link_port_vgraph_callback_by_uuid(void * context, ladish_graph_ return true; /* continue vgraph iteration */ } -static bool find_link_port_vgraph_callback_by_jack_id(void * context, ladish_graph_handle graph, ladish_app_supervisor_handle app_supervisor) +static +bool +find_link_port_vgraph_callback_by_jack_id( + void * context, + ladish_graph_handle graph, + ladish_app_supervisor_handle UNUSED(app_supervisor)) { ladish_port_handle port; bool room; @@ -174,7 +184,12 @@ static bool find_link_port_vgraph_callback_by_jack_id(void * context, ladish_gra #undef find_link_port_context_ptr -static ladish_graph_handle find_link_port_vgraph_by_uuid(struct virtualizer * virtualizer_ptr, const char * port_name, ladish_port_handle * port_ptr) +static +ladish_graph_handle +find_link_port_vgraph_by_uuid( + struct virtualizer * UNUSED(virtualizer_ptr), + const char * port_name, + ladish_port_handle * port_ptr) { struct find_link_port_context context; @@ -192,7 +207,12 @@ static ladish_graph_handle find_link_port_vgraph_by_uuid(struct virtualizer * vi return context.graph; } -static ladish_graph_handle find_link_port_vgraph_by_jack_id(struct virtualizer * virtualizer_ptr, uint64_t jack_id, ladish_port_handle * port_ptr) +static +ladish_graph_handle +find_link_port_vgraph_by_jack_id( + struct virtualizer * UNUSED(virtualizer_ptr), + uint64_t jack_id, + ladish_port_handle * port_ptr) { struct find_link_port_context context; @@ -248,7 +268,7 @@ lookup_port( #define virtualizer_ptr ((struct virtualizer *)context) -static void clear(void * context) +static void clear(void * UNUSED(context)) { log_info("clear"); } @@ -398,14 +418,14 @@ static void port_disappeared(void * context, uint64_t client_id, uint64_t port_i bool force_port_disappear( void * context, - ladish_graph_handle graph_handle, + ladish_graph_handle UNUSED(graph_handle), bool hidden, ladish_client_handle client_handle, const char * client_name, ladish_port_handle port_handle, const char * port_name, - uint32_t port_type, - uint32_t port_flags) + uint32_t UNUSED(port_type), + uint32_t UNUSED(port_flags)) { uint64_t client_id; uint64_t port_id; @@ -996,12 +1016,19 @@ static void port_disappeared(void * context, uint64_t client_id, uint64_t port_i } } -static void port_renamed(void * context, uint64_t client_id, uint64_t port_id, const char * old_port_name, const char * new_port_name) +static +void +port_renamed( + void * context, + uint64_t client_id, + uint64_t port_id, + const char * old_port_name, + const char * new_port_name) { ladish_port_handle port; ladish_graph_handle vgraph; - log_info("port_renamed(%"PRIu64", '%s', '%s')", port_id, old_port_name, new_port_name); + log_info("port_renamed(%"PRIu64":%"PRIu64", '%s', '%s')", client_id, port_id, old_port_name, new_port_name); port = ladish_graph_find_port_by_jack_id(virtualizer_ptr->jack_graph, port_id, true, true); if (port == NULL) @@ -1323,9 +1350,9 @@ bool remove_app_port( void * context, ladish_graph_handle graph_handle, - bool hidden, - void * client_iteration_context_ptr, - ladish_client_handle client_handle, + bool UNUSED(hidden), + void * UNUSED(client_iteration_context_ptr), + ladish_client_handle UNUSED(client_handle), const char * client_name, ladish_port_handle port_handle, const char * port_name, @@ -1465,7 +1492,7 @@ void ladish_virtualizer_rename_app( void * vgraph_context, const uuid_t uuid, - const char * old_name, + const char * UNUSED(old_name), const char * new_app_name) { ladish_client_handle client; @@ -1514,12 +1541,12 @@ bool move_capture_port_callback( void * context, ladish_graph_handle graph_handle, - bool hidden, + bool UNUSED(hidden), ladish_client_handle client_handle, - const char * client_name, + const char * UNUSED(client_name), ladish_port_handle port_handle, - const char * port_name, - uint32_t port_type, + const char * UNUSED(port_name), + uint32_t UNUSED(port_type), uint32_t port_flags) { ASSERT(client_handle != context); /* source and destination clients must be differ */ @@ -1571,13 +1598,13 @@ bool move_port_callback( void * context, ladish_graph_handle graph_handle, - bool hidden, + bool UNUSED(hidden), ladish_client_handle client_handle, - const char * client_name, + const char * UNUSED(client_name), ladish_port_handle port_handle, - const char * port_name, - uint32_t port_type, - uint32_t port_flags) + const char * UNUSED(port_name), + uint32_t UNUSED(port_type), + uint32_t UNUSED(port_flags)) { ASSERT(client_handle != context); /* source and destination clients must be differ */ ladish_graph_move_port(graph_handle, port_handle, context); diff --git a/gui/action.c b/gui/action.c index 86cceb45..0296e172 100644 --- a/gui/action.c +++ b/gui/action.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010 Nedko Arnaudov + * Copyright (C) 2010,2012 Nedko Arnaudov * ************************************************************************** * This file contains GtkAction related code @@ -41,10 +41,10 @@ GtkAction * g_zoom_out_action; static gboolean load_project_accelerator_activated( - GtkAccelGroup * accel_group, - GObject * acceleratable, - guint keyval, - GdkModifierType modifier) + GtkAccelGroup * UNUSED(accel_group), + GObject * UNUSED(acceleratable), + guint UNUSED(keyval), + GdkModifierType UNUSED(modifier)) { graph_view_handle view; @@ -60,10 +60,10 @@ load_project_accelerator_activated( static gboolean unload_project_accelerator_activated( - GtkAccelGroup * accel_group, - GObject * acceleratable, - guint keyval, - GdkModifierType modifier) + GtkAccelGroup * UNUSED(accel_group), + GObject * UNUSED(acceleratable), + guint UNUSED(keyval), + GdkModifierType UNUSED(modifier)) { graph_view_handle view; diff --git a/gui/control.c b/gui/control.c index 9198d98d..c1a735a3 100644 --- a/gui/control.c +++ b/gui/control.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010 Nedko Arnaudov + * Copyright (C) 2010,2012 Nedko Arnaudov * ************************************************************************** * This file contains code related to the ladishd control object @@ -33,7 +33,7 @@ static guint g_ladishd_poll_source_tag; -static gboolean poll_ladishd(gpointer data) +static gboolean poll_ladishd(gpointer UNUSED(data)) { control_proxy_ping(); return TRUE; diff --git a/gui/create_room_dialog.c b/gui/create_room_dialog.c index ca819ef9..55f36faa 100644 --- a/gui/create_room_dialog.c +++ b/gui/create_room_dialog.c @@ -40,7 +40,7 @@ static GtkWidget * g_dialog; static GtkListStore * g_liststore; static GtkTreeView * g_treeview; -bool on_key_press_event(GtkWidget * widget_ptr, GdkEventKey * event_ptr, gpointer user_data) +bool on_key_press_event(GtkWidget * UNUSED(widget_ptr), GdkEventKey * event_ptr, gpointer UNUSED(user_data)) { if (event_ptr->type == GDK_KEY_PRESS && (event_ptr->keyval == GDK_Return || @@ -53,7 +53,13 @@ bool on_key_press_event(GtkWidget * widget_ptr, GdkEventKey * event_ptr, gpointe return false; } -static void on_row_activated(GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * col, gpointer userdata) +static +void +on_row_activated( + GtkTreeView * UNUSED(treeview), + GtkTreePath * UNUSED(path), + GtkTreeViewColumn * UNUSED(col), + gpointer UNUSED(userdata)) { gtk_dialog_response(GTK_DIALOG(g_dialog), 2); } @@ -88,7 +94,7 @@ void create_room_dialog_uninit(void) g_object_unref(g_liststore); } -static void fill_templates_callback(void * context, const char * template_name) +static void fill_templates_callback(void * UNUSED(context), const char * template_name) { GtkTreeIter iter; diff --git a/gui/dynmenu.c b/gui/dynmenu.c index 46132b1f..c96a7579 100644 --- a/gui/dynmenu.c +++ b/gui/dynmenu.c @@ -57,7 +57,7 @@ struct ladish_dynmenu_item_data ladish_dynmenu_item_activate_callback item_activate_callback; }; -void on_activate_item(GtkMenuItem * item, struct ladish_dynmenu_item_data * data_ptr) +void on_activate_item(GtkMenuItem * UNUSED(item), struct ladish_dynmenu_item_data * data_ptr) { //log_info("on_activate_item('%s')", gtk_label_get_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(data_ptr->item))))); @@ -68,7 +68,7 @@ void on_activate_item(GtkMenuItem * item, struct ladish_dynmenu_item_data * data #define data_ptr ((struct ladish_dynmenu_item_data *)data) -void free_item_data(gpointer data, GClosure * closure) +void free_item_data(gpointer data, GClosure * UNUSED(closure)) { //log_info("data_ptr %p deallocate", data_ptr); diff --git a/gui/graph_canvas.c b/gui/graph_canvas.c index ab8697fe..4ea56277 100644 --- a/gui/graph_canvas.c +++ b/gui/graph_canvas.c @@ -174,7 +174,7 @@ module_location_changed( y_str); } -static void on_popup_menu_action_client_rename(GtkWidget * menuitem, gpointer module_context) +static void on_popup_menu_action_client_rename(GtkWidget * UNUSED(menuitem), gpointer module_context) { log_info("on_popup_menu_action_client_rename %"PRIu64, client_ptr->id); @@ -191,13 +191,13 @@ static void on_popup_menu_action_client_rename(GtkWidget * menuitem, gpointer mo } } -static void on_popup_menu_action_split(GtkWidget * menuitem, gpointer module_context) +static void on_popup_menu_action_split(GtkWidget * UNUSED(menuitem), gpointer module_context) { //log_info("on_popup_menu_action_split"); graph_proxy_split(client_ptr->owner_ptr->graph, client_ptr->id); } -static void on_popup_menu_action_remove(GtkWidget * menuitem, gpointer module_context) +static void on_popup_menu_action_remove(GtkWidget * UNUSED(menuitem), gpointer module_context) { //log_info("on_popup_menu_action_split"); if (!graph_proxy_remove_client(client_ptr->owner_ptr->graph, client_ptr->id)) @@ -237,7 +237,7 @@ static void fill_module_menu(GtkMenu * menu, void * module_context) #define port_ptr ((struct port *)port_context) -static void on_popup_menu_action_port_rename(GtkWidget * menuitem, gpointer port_context) +static void on_popup_menu_action_port_rename(GtkWidget * UNUSED(menuitem), gpointer port_context) { log_info("on_popup_menu_action_port_rename %"PRIu64, port_ptr->id); @@ -254,7 +254,7 @@ static void on_popup_menu_action_port_rename(GtkWidget * menuitem, gpointer port } } -static void on_popup_menu_action_port_move(GtkWidget * menuitem, gpointer port_context) +static void on_popup_menu_action_port_move(GtkWidget * UNUSED(menuitem), gpointer port_context) { struct client * client_ptr; @@ -293,7 +293,7 @@ static void fill_port_menu(GtkMenu * menu, void * port_context) #define canvas_ptr ((struct graph_canvas *)canvas_context) -static void on_popup_menu_action_join_clients(GtkWidget * menuitem, gpointer canvas_context) +static void on_popup_menu_action_join_clients(GtkWidget * UNUSED(menuitem), gpointer canvas_context) { struct client * client1_ptr; struct client * client2_ptr; @@ -309,7 +309,7 @@ static void on_popup_menu_action_join_clients(GtkWidget * menuitem, gpointer can } } -static void on_popup_menu_action_new_client(GtkWidget * menuitem, gpointer canvas_context) +static void on_popup_menu_action_new_client(GtkWidget * UNUSED(menuitem), gpointer canvas_context) { char * new_name; uint64_t client_id; @@ -554,7 +554,7 @@ port_appeared( uint64_t port_id, const char * port_name, bool is_input, - bool is_terminal, + bool UNUSED(is_terminal), bool is_midi) { int color; diff --git a/gui/graph_view.c b/gui/graph_view.c index dc2927fa..34a0c37a 100644 --- a/gui/graph_view.c +++ b/gui/graph_view.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2009, 2010, 2011 Nedko Arnaudov + * Copyright (C) 2009,2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of the graph view object @@ -127,8 +127,8 @@ project_properties_changed( void * context, const char * project_dir, const char * project_name, - const char * project_description, - const char * project_notes) + const char * UNUSED(project_description), + const char * UNUSED(project_notes)) { bool empty; char * project_name_buffer; diff --git a/gui/jack.c b/gui/jack.c index 8d479dff..64a3c19f 100644 --- a/gui/jack.c +++ b/gui/jack.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2008, 2009, 2010, 2011 Nedko Arnaudov + * Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov * Copyright (C) 2007 Dave Robillard * ************************************************************************** @@ -163,7 +163,7 @@ static void update_load(void) } } -static gboolean poll_jack(gpointer data) +static gboolean poll_jack(gpointer UNUSED(data)) { update_load(); update_buffer_size(false); diff --git a/gui/load_project_dialog.c b/gui/load_project_dialog.c index 0fac1561..7af8e1d7 100644 --- a/gui/load_project_dialog.c +++ b/gui/load_project_dialog.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010 Nedko Arnaudov + * Copyright (C) 2010,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of the load project dialog @@ -111,7 +111,7 @@ static int mtime_sorter(GtkTreeModel * model, GtkTreeIter * a, GtkTreeIter * b, } #endif -static gboolean reject_filter(const GtkFileFilterInfo * filter_info, gpointer data) +static gboolean reject_filter(const GtkFileFilterInfo * UNUSED(filter_info), gpointer UNUSED(data)) { //log_info("filter: '%s'", filter_info->filename); return FALSE; @@ -156,7 +156,7 @@ static void on_dir_select(GtkWidget * widget, gpointer data) } #endif -static void dir_changed(GtkWidget * widget, gpointer data) +static void dir_changed(GtkWidget * UNUSED(widget), gpointer data) { char * dir; diff --git a/gui/menu.c b/gui/menu.c index fc5674c2..4f12ab83 100644 --- a/gui/menu.c +++ b/gui/menu.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010 Nedko Arnaudov + * Copyright (C) 2010,2012 Nedko Arnaudov * ************************************************************************** * This file contains menu related code @@ -370,17 +370,17 @@ void menu_set_toolbar_visibility(bool visible) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(g_menu_item_view_toolbar), visible); } -static void on_popup_menu_action_start_app(GtkWidget * menuitem, gpointer userdata) +static void on_popup_menu_action_start_app(GtkWidget * UNUSED(menuitem), gpointer UNUSED(userdata)) { menu_request_start_app(); } -static void on_popup_menu_action_create_room(GtkWidget * menuitem, gpointer userdata) +static void on_popup_menu_action_create_room(GtkWidget * UNUSED(menuitem), gpointer UNUSED(userdata)) { menu_request_create_room(); } -static void on_popup_menu_action_destroy_room(GtkWidget * menuitem, gpointer userdata) +static void on_popup_menu_action_destroy_room(GtkWidget * UNUSED(menuitem), gpointer UNUSED(userdata)) { menu_request_destroy_room(); } diff --git a/gui/toolbar.c b/gui/toolbar.c index 1d2c7076..4e482177 100644 --- a/gui/toolbar.c +++ b/gui/toolbar.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010 Nedko Arnaudov + * Copyright (C) 2010,2012 Nedko Arnaudov * ************************************************************************** * This file contains toolbar related code @@ -47,7 +47,7 @@ void menu_request_toggle_toolbar(bool visible) conf_set_bool(LADISH_CONF_KEY_GLADISH_TOOLBAR_VISIBILITY, visible); } -void on_dbus_toggle_toobar(void * context, const char * key, const char * value) +void on_dbus_toggle_toobar(void * UNUSED(context), const char * UNUSED(key), const char * value) { bool toolbar_visible; diff --git a/gui/world_tree.c b/gui/world_tree.c index f60059c4..582559f9 100644 --- a/gui/world_tree.c +++ b/gui/world_tree.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2008, 2009, 2010, 2011 Nedko Arnaudov + * Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of the project_list class @@ -82,11 +82,11 @@ bool get_app_view(GtkTreeIter * app_iter_ptr, graph_view_handle * view_ptr) static gboolean on_select( - GtkTreeSelection * selection, + GtkTreeSelection * UNUSED(selection), GtkTreeModel * model, GtkTreePath * path, gboolean path_currently_selected, - gpointer data) + gpointer UNUSED(data)) { GtkTreeIter iter; graph_view_handle view; @@ -154,7 +154,7 @@ bool get_selected_app_id(graph_view_handle * view_ptr, uint64_t * id_ptr) return true; } -void on_popup_menu_action_app_start(GtkWidget * menuitem, gpointer userdata) +void on_popup_menu_action_app_start(GtkWidget * UNUSED(menuitem), gpointer UNUSED(userdata)) { uint64_t id; ladish_app_supervisor_proxy_handle proxy; @@ -171,7 +171,7 @@ void on_popup_menu_action_app_start(GtkWidget * menuitem, gpointer userdata) ladish_app_supervisor_proxy_start_app(proxy, id); } -void on_popup_menu_action_app_stop(GtkWidget * menuitem, gpointer userdata) +void on_popup_menu_action_app_stop(GtkWidget * UNUSED(menuitem), gpointer UNUSED(userdata)) { uint64_t id; ladish_app_supervisor_proxy_handle proxy; @@ -188,7 +188,7 @@ void on_popup_menu_action_app_stop(GtkWidget * menuitem, gpointer userdata) ladish_app_supervisor_proxy_stop_app(proxy, id); } -void on_popup_menu_action_app_kill(GtkWidget * menuitem, gpointer userdata) +void on_popup_menu_action_app_kill(GtkWidget * UNUSED(menuitem), gpointer UNUSED(userdata)) { uint64_t id; ladish_app_supervisor_proxy_handle proxy; @@ -205,7 +205,7 @@ void on_popup_menu_action_app_kill(GtkWidget * menuitem, gpointer userdata) ladish_app_supervisor_proxy_kill_app(proxy, id); } -void on_popup_menu_action_app_remove(GtkWidget * menuitem, gpointer userdata) +void on_popup_menu_action_app_remove(GtkWidget * UNUSED(menuitem), gpointer UNUSED(userdata)) { uint64_t id; ladish_app_supervisor_proxy_handle proxy; @@ -222,7 +222,7 @@ void on_popup_menu_action_app_remove(GtkWidget * menuitem, gpointer userdata) ladish_app_supervisor_proxy_remove_app(proxy, id); } -void on_popup_menu_action_app_properties(GtkWidget * menuitem, gpointer userdata) +void on_popup_menu_action_app_properties(GtkWidget * UNUSED(menuitem), gpointer UNUSED(userdata)) { uint64_t id; ladish_app_supervisor_proxy_handle proxy; @@ -337,7 +337,7 @@ void on_popup_menu_action_app_properties(GtkWidget * menuitem, gpointer userdata gtk_widget_hide(g_app_dialog); } -void popup_menu(GtkWidget * treeview, GdkEventButton * event) +void popup_menu(GtkWidget * UNUSED(treeview), GdkEventButton * event) { GtkTreeSelection * selection; GtkTreeIter iter; @@ -417,7 +417,7 @@ void popup_menu(GtkWidget * treeview, GdkEventButton * event) gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, (event != NULL) ? event->button : 0, gdk_event_get_time((GdkEvent *)event)); } -gboolean on_button_pressed(GtkWidget * treeview, GdkEventButton * event, gpointer userdata) +gboolean on_button_pressed(GtkWidget * treeview, GdkEventButton * event, gpointer UNUSED(userdata)) { /* single click with the right mouse button? */ if (event->type == GDK_BUTTON_PRESS && event->button == 3) @@ -451,13 +451,19 @@ gboolean on_button_pressed(GtkWidget * treeview, GdkEventButton * event, gpointe return FALSE; /* we did not handle this */ } -gboolean on_popup_menu(GtkWidget * treeview, gpointer userdata) +gboolean on_popup_menu(GtkWidget * treeview, gpointer UNUSED(userdata)) { popup_menu(treeview, NULL); return TRUE; /* we handled this */ } -static void on_row_activated(GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * col, gpointer userdata) +static +void +on_row_activated( + GtkTreeView * UNUSED(treeview), + GtkTreePath * path, + GtkTreeViewColumn * UNUSED(col), + gpointer UNUSED(userdata)) { GtkTreeIter iter; gint type; @@ -640,7 +646,7 @@ void world_tree_name_changed(graph_view_handle view) } } -static char * get_app_name_string(const char * app_name, bool running, bool terminal, const char * level) +static char * get_app_name_string(const char * app_name, bool running, bool UNUSED(terminal), const char * level) { char * app_name_with_status; const char * level_string; diff --git a/jmcore.c b/jmcore.c index c5e10ca6..c3fd55b2 100644 --- a/jmcore.c +++ b/jmcore.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010,2011 Nedko Arnaudov + * Copyright (C) 2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of the JACK multicore (snake) @@ -208,7 +208,7 @@ bool install_term_signal_handler(int signum, bool ignore_if_already_ignored) return true; } -int main(int argc, char ** argv) +int main(int UNUSED(argc), char ** UNUSED(argv)) { INIT_LIST_HEAD(&g_pairs); diff --git a/lash_compat/liblash/lash.c b/lash_compat/liblash/lash.c index 7d2eb71e..a70e7d38 100644 --- a/lash_compat/liblash/lash.c +++ b/lash_compat/liblash/lash.c @@ -237,26 +237,26 @@ exit: } LADISH_PUBLIC -const char * lash_protocol_string(lash_protocol_t protocol) +const char * lash_protocol_string(lash_protocol_t UNUSED(protocol)) { return "ladish"; } LADISH_PUBLIC -lash_args_t * lash_extract_args(int * argc, char *** argv) +lash_args_t * lash_extract_args(int * UNUSED(argc), char *** UNUSED(argv)) { /* nothing to do, ladish does not pass any specific arguments */ return NULL; } LADISH_PUBLIC -void lash_args_destroy(lash_args_t * args) +void lash_args_destroy(lash_args_t * UNUSED(args)) { /* nothing to do, ladish does not pass any specific arguments */ } LADISH_PUBLIC -lash_client_t * lash_init(const lash_args_t * args, const char * class, int client_flags, lash_protocol_t protocol) +lash_client_t * lash_init(const lash_args_t * UNUSED(args), const char * class, int client_flags, lash_protocol_t UNUSED(protocol)) { DBusError error; DBusMessage * msg_ptr; @@ -681,7 +681,7 @@ void lash_event_set_string(lash_event_t * event_ptr, const char * string) } LADISH_PUBLIC -const char * lash_event_get_project(const lash_event_t * event_ptr) +const char * lash_event_get_project(const lash_event_t * UNUSED(event_ptr)) { /* Server interface - not implemented */ ASSERT_NO_PASS; /* lash_init() fails if LASH_Server_Interface is set */ @@ -689,28 +689,28 @@ const char * lash_event_get_project(const lash_event_t * event_ptr) } LADISH_PUBLIC -void lash_event_set_project(lash_event_t * event_ptr, const char * project) +void lash_event_set_project(lash_event_t * UNUSED(event_ptr), const char * UNUSED(project)) { /* Server interface - not implemented */ ASSERT_NO_PASS; /* lash_init() fails if LASH_Server_Interface is set */ } LADISH_PUBLIC -void lash_event_get_client_id(const lash_event_t * event_ptr, uuid_t id) +void lash_event_get_client_id(const lash_event_t * UNUSED(event_ptr), uuid_t UNUSED(id)) { /* Server interface - not implemented */ ASSERT_NO_PASS; /* lash_init() fails if LASH_Server_Interface is set */ } LADISH_PUBLIC -void lash_event_set_client_id(lash_event_t * event_ptr, uuid_t id) +void lash_event_set_client_id(lash_event_t * UNUSED(event_ptr), uuid_t UNUSED(id)) { /* Server interface - not implemented */ ASSERT_NO_PASS; /* lash_init() fails if LASH_Server_Interface is set */ } LADISH_PUBLIC -unsigned char lash_event_get_alsa_client_id(const lash_event_t * event_ptr) +unsigned char lash_event_get_alsa_client_id(const lash_event_t * UNUSED(event_ptr)) { /* Server interface - not implemented */ ASSERT_NO_PASS; /* lash_init() fails if LASH_Server_Interface is set */ @@ -718,7 +718,7 @@ unsigned char lash_event_get_alsa_client_id(const lash_event_t * event_ptr) } LADISH_PUBLIC -unsigned char lash_str_get_alsa_client_id(const char * str) +unsigned char lash_str_get_alsa_client_id(const char * UNUSED(str)) { /* Server interface - not implemented */ ASSERT_NO_PASS; /* lash_init() fails if LASH_Server_Interface is set */ @@ -727,27 +727,27 @@ unsigned char lash_str_get_alsa_client_id(const char * str) } LADISH_PUBLIC -void lash_jack_client_name(lash_client_t * client_ptr, const char * name) +void lash_jack_client_name(lash_client_t * UNUSED(client_ptr), const char * UNUSED(name)) { /* nothing to do, ladish detects jack client name through jack server */ } LADISH_PUBLIC -void lash_str_set_alsa_client_id(char * str, unsigned char alsa_id) +void lash_str_set_alsa_client_id(char * UNUSED(str), unsigned char UNUSED(alsa_id)) { /* nothing to do, ladish detects alsa id through alsapid.so, jack and a2jmidid */ /* this is an undocumented function and probably internal one that sneaked to the public API */ } LADISH_PUBLIC -void lash_event_set_alsa_client_id(lash_event_t * event_ptr, unsigned char alsa_id) +void lash_event_set_alsa_client_id(lash_event_t * event_ptr, unsigned char UNUSED(alsa_id)) { /* set event type, so we can silently ignore the event, when sent */ lash_event_set_type(event_ptr, LASH_Alsa_Client_ID); } LADISH_PUBLIC -void lash_alsa_client_id(lash_client_t * client, unsigned char id) +void lash_alsa_client_id(lash_client_t * UNUSED(client), unsigned char UNUSED(id)) { /* nothing to do, ladish detects alsa id through alsapid.so, jack and a2jmidid */ } @@ -982,7 +982,7 @@ const char * lash_get_fqn(const char * dir, const char * file) /***************************************************************************/ /* D-Bus interface implementation */ -static void lash_quit(struct cdbus_method_call * call_ptr) +static void lash_quit(struct cdbus_method_call * UNUSED(call_ptr)) { log_debug("Quit command received through D-Bus"); g_quit = true; diff --git a/proxies/a2j_proxy.c b/proxies/a2j_proxy.c index 8cb5b84c..896749c1 100644 --- a/proxies/a2j_proxy.c +++ b/proxies/a2j_proxy.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2008,2009,2010,2011 Nedko Arnaudov + * Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains code that interface with a2jmidid through D-Bus @@ -33,7 +33,11 @@ static bool g_a2j_started = false; static char * g_a2j_jack_client_name = NULL; -static void on_a2j_bridge_started(void * context, DBusMessage * message_ptr) +static +void +on_a2j_bridge_started( + void * UNUSED(context), + DBusMessage * UNUSED(message_ptr)) { log_info("a2j bridge start detected."); @@ -46,7 +50,11 @@ static void on_a2j_bridge_started(void * context, DBusMessage * message_ptr) g_a2j_started = true; } -static void on_a2j_bridge_stopped(void * context, DBusMessage * message_ptr) +static +void +on_a2j_bridge_stopped( + void * UNUSED(context), + DBusMessage * UNUSED(message_ptr)) { if (g_a2j_jack_client_name != NULL) { diff --git a/proxies/conf_proxy.c b/proxies/conf_proxy.c index 4a474e90..f3504e45 100644 --- a/proxies/conf_proxy.c +++ b/proxies/conf_proxy.c @@ -117,7 +117,7 @@ static void on_life_status_changed(bool appeared) } } -static void on_conf_changed(void * context, DBusMessage * message_ptr) +static void on_conf_changed(void * UNUSED(context), DBusMessage * message_ptr) { const char * key; const char * value; diff --git a/proxies/control_proxy.c b/proxies/control_proxy.c index 8d4355b3..393ac447 100644 --- a/proxies/control_proxy.c +++ b/proxies/control_proxy.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2009,2010,2011 Nedko Arnaudov + * Copyright (C) 2009,2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of code that interfaces @@ -29,19 +29,19 @@ static bool g_clean_exit; -static void on_studio_appeared(void * context, DBusMessage * message_ptr) +static void on_studio_appeared(void * UNUSED(context), DBusMessage * UNUSED(message_ptr)) { log_info("StudioAppeared"); control_proxy_on_studio_appeared(false); } -static void on_studio_disappeared(void * context, DBusMessage * message_ptr) +static void on_studio_disappeared(void * UNUSED(context), DBusMessage * UNUSED(message_ptr)) { log_info("StudioDisappeared"); control_proxy_on_studio_disappeared(); } -static void on_clean_exit(void * context, DBusMessage * message_ptr) +static void on_clean_exit(void * UNUSED(context), DBusMessage * UNUSED(message_ptr)) { g_clean_exit = true; } diff --git a/proxies/jack_proxy.c b/proxies/jack_proxy.c index e676db38..2c0b6d01 100644 --- a/proxies/jack_proxy.c +++ b/proxies/jack_proxy.c @@ -31,7 +31,11 @@ jack_proxy_callback_server_stopped g_on_server_stopped; jack_proxy_callback_server_appeared g_on_server_appeared; jack_proxy_callback_server_disappeared g_on_server_disappeared; -static void on_jack_server_started(void * context, DBusMessage * message_ptr) +static +void +on_jack_server_started( + void * UNUSED(context), + DBusMessage * UNUSED(message_ptr)) { log_debug("JACK server start signal received."); if (g_on_server_started != NULL) @@ -40,7 +44,11 @@ static void on_jack_server_started(void * context, DBusMessage * message_ptr) } } -static void on_jack_server_stopped(void * context, DBusMessage * message_ptr) +static +void +on_jack_server_stopped( + void * UNUSED(context), + DBusMessage * UNUSED(message_ptr)) { log_debug("JACK server stop signal received."); if (g_on_server_stopped != NULL) @@ -154,9 +162,10 @@ jack_proxy_is_started( bool jack_proxy_connect_ports( - uint64_t port1_id, - uint64_t port2_id) + uint64_t UNUSED(port1_id), + uint64_t UNUSED(port2_id)) { + /* not implemented */ return false; } @@ -635,7 +644,7 @@ struct jack_proxy_session_save_one_reply_cookie #define cookie_ptr ((struct jack_proxy_session_save_one_reply_cookie *)void_cookie) -static void jack_proxy_session_save_one_handle_reply(void * context, void * void_cookie, DBusMessage * reply_ptr) +static void jack_proxy_session_save_one_handle_reply(void * UNUSED(context), void * void_cookie, DBusMessage * reply_ptr) { const char * reply_signature; DBusMessageIter top_iter; diff --git a/proxies/jmcore_proxy.c b/proxies/jmcore_proxy.c index b5e70929..ece883b2 100644 --- a/proxies/jmcore_proxy.c +++ b/proxies/jmcore_proxy.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2010,2011 Nedko Arnaudov + * Copyright (C) 2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains code that interfaces the jmcore through D-Bus @@ -29,7 +29,7 @@ int64_t g_jmcore_pid; -static void on_jmcore_life_status_changed(bool appeared) +static void on_jmcore_life_status_changed(bool UNUSED(appeared)) { g_jmcore_pid = 0; } diff --git a/proxies/studio_proxy.c b/proxies/studio_proxy.c index 32c6b95f..3d84031b 100644 --- a/proxies/studio_proxy.c +++ b/proxies/studio_proxy.c @@ -2,7 +2,7 @@ /* * LADI Session Handler (ladish) * - * Copyright (C) 2009,2010,2011 Nedko Arnaudov + * Copyright (C) 2009,2010,2011,2012 Nedko Arnaudov * ************************************************************************** * This file contains implementation of the helper functionality @@ -36,7 +36,7 @@ static void (* g_room_appeared_calback)(const char * opath, const char * name, c static void (* g_room_disappeared_calback)(const char * opath, const char * name, const char * template) = NULL; static void (* g_room_changed_calback)(const char * opath, const char * name, const char * template) = NULL; -static void on_studio_renamed(void * context, DBusMessage * message_ptr) +static void on_studio_renamed(void * UNUSED(context), DBusMessage * message_ptr) { char * name; @@ -95,7 +95,7 @@ static bool extract_room_info_from_signal(DBusMessage * message_ptr, const char return extract_room_info(&iter, opath, name, template); } -static void on_studio_started(void * context, DBusMessage * message_ptr) +static void on_studio_started(void * UNUSED(context), DBusMessage * UNUSED(message_ptr)) { log_info("StudioStarted"); @@ -105,7 +105,7 @@ static void on_studio_started(void * context, DBusMessage * message_ptr) } } -static void on_studio_stopped(void * context, DBusMessage * message_ptr) +static void on_studio_stopped(void * UNUSED(context), DBusMessage * UNUSED(message_ptr)) { log_info("StudioStopped"); @@ -115,7 +115,7 @@ static void on_studio_stopped(void * context, DBusMessage * message_ptr) } } -static void on_studio_crashed(void * context, DBusMessage * message_ptr) +static void on_studio_crashed(void * UNUSED(context), DBusMessage * UNUSED(message_ptr)) { log_info("StudioCrashed"); @@ -125,7 +125,7 @@ static void on_studio_crashed(void * context, DBusMessage * message_ptr) } } -static void on_room_appeared(void * context, DBusMessage * message_ptr) +static void on_room_appeared(void * UNUSED(context), DBusMessage * message_ptr) { const char * opath; const char * name; @@ -139,7 +139,7 @@ static void on_room_appeared(void * context, DBusMessage * message_ptr) } } -static void on_room_disappeared(void * context, DBusMessage * message_ptr) +static void on_room_disappeared(void * UNUSED(context), DBusMessage * message_ptr) { const char * opath; const char * name; @@ -153,7 +153,7 @@ static void on_room_disappeared(void * context, DBusMessage * message_ptr) } } -static void on_room_changed(void * context, DBusMessage * message_ptr) +static void on_room_changed(void * UNUSED(context), DBusMessage * message_ptr) { const char * opath; const char * name; diff --git a/wscript b/wscript index e6148479..a9e5ee77 100644 --- a/wscript +++ b/wscript @@ -219,7 +219,7 @@ def configure(conf): # lash_wrap code is generated by swig and causes warnings if not conf.env['BUILD_PYLASH']: add_cflag(conf, '-Wextra') - add_cflag(conf, '-Wno-unused-parameter') + conf.env.append_unique('CXXFLAGS', '-Wno-unused-parameter') # the UNUSED() macro doesnt work for C++ if conf.env['BUILD_WERROR']: add_cflag(conf, '-Werror') # for pre gcc-4.4, enable optimizations so use of uninitialized variables gets detected