Fix unused-parameter warnings in plain C code

This commit is contained in:
Nedko Arnaudov 2012-12-02 23:50:05 +02:00
parent abf820278b
commit ebce813997
41 changed files with 329 additions and 238 deletions

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2008,2009,2010,2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2008 Juuso Alasuutari <juuso.alasuutari@gmail.com>
*
**************************************************************************
@ -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)
{

View File

@ -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 : "<unknown>");
}

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2009,2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2009,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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 */

View File

@ -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;
}

4
conf.c
View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2010,2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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)
{

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2010 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2010,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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,

View File

@ -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;

View File

@ -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;

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2009,2010,2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2009,2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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;
}

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2008,2009,2010,2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2008 Juuso Alasuutari <juuso.alasuutari@gmail.com>
*
**************************************************************************
@ -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;

View File

@ -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;

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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;

View File

@ -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;

View File

@ -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);

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2008,2009,2010,2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2008 Juuso Alasuutari <juuso.alasuutari@gmail.com>
* Copyright (C) 2002 Robert Ham <rah@bash.sh>
*
@ -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;

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2008, 2009 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2008,2009,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* This file contains the code that sets process "title"
@ -29,7 +29,7 @@
#include <stdarg.h>
#include <string.h>
#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;

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2010, 2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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);

View File

@ -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)
{

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2010, 2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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];

View File

@ -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 */

View File

@ -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);

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2010 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2010,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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;

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2010 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2010,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2009, 2010, 2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2009,2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* 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;

View File

@ -2,7 +2,7 @@
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2008, 2009, 2010, 2011 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2008,2009,2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
*
**************************************************************************
@ -163,7 +163,7 @@ static void update_load(void)
}
}
static gboolean poll_jack(gpointer data)