shairport_sync_SOURCES = shairport.c rtsp.c mdns.c mdns_external.c common.c rtp.c player.c alac.c audio.c loudness.c
-AM_CFLAGS = -Wno-multichar -Wall -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
+AM_CFLAGS = -Wno-multichar -Wall -Wextra -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
if BUILD_FOR_FREEBSD
AM_CPPFLAGS = -I/usr/local/include -Wno-multichar -DSYSCONFDIR=\"$(sysconfdir)\" -O2
else
char *metadata_pipename;
char *metadata_sockaddr;
int metadata_sockport;
- int metadata_sockmsglength;
+ size_t metadata_sockmsglength;
int get_coverart;
#endif
uint8_t hw_addr[6];
int code;
};
-static void *response_realloc(void *opaque, void *ptr, int size) { return realloc(ptr, size); }
+static void *response_realloc(__attribute__((unused)) void *opaque, void *ptr, int size) {
+ return realloc(ptr, size);
+}
static void response_body(void *opaque, const char *data, int size) {
struct HttpResponse *response = (struct HttpResponse *)opaque;
response->size += size;
}
-static void response_header(void *opaque, const char *ckey, int nkey, const char *cvalue,
- int nvalue) { /* example doesn't care about headers */
+static void
+response_header(__attribute__((unused)) void *opaque, __attribute__((unused)) const char *ckey,
+ __attribute__((unused)) int nkey, __attribute__((unused)) const char *cvalue,
+ __attribute__((unused)) int nvalue) { /* example doesn't care about headers */
}
static void response_code(void *opaque, int code) {
// Send command
// debug(1,"DACP connect message: \"%s\".",message);
- if (send(sockfd, message, strlen(message), 0) != strlen(message)) {
+ if (send(sockfd, message, strlen(message), 0) != (ssize_t)strlen(message)) {
// debug(1, "Send failed");
response.code = 493; // Client failed to send a message
pthread_mutex_unlock(&dacp_server_information_lock);
}
-void *dacp_monitor_thread_code(void *na) {
+void *dacp_monitor_thread_code(__attribute__((unused)) void *na) {
int scan_index = 0;
// char server_reply[10000];
// debug(1, "DACP monitor thread started.");
#include "dbus-service.h"
#include "metadata_hub.h"
-void dbus_metadata_watcher(struct metadata_bundle *argc, void *userdata) {
+void dbus_metadata_watcher(struct metadata_bundle *argc, __attribute__((unused)) void *userdata) {
// debug(1, "DBUS metadata watcher called");
- shairport_sync_set_volume(shairportSyncSkeleton, metadata_store.speaker_volume);
+ shairport_sync_set_volume(shairportSyncSkeleton, argc->speaker_volume);
}
-gboolean notify_loudness_filter_active_callback(ShairportSync *skeleton, gpointer user_data) {
+gboolean notify_loudness_filter_active_callback(ShairportSync *skeleton,
+ __attribute__((unused)) gpointer user_data) {
debug(1, "\"notify_loudness_filter_active_callback\" called.");
if (shairport_sync_get_loudness_filter_active(skeleton)) {
debug(1, "activating loudness filter");
return TRUE;
}
-gboolean notify_loudness_threshold_callback(ShairportSync *skeleton, gpointer user_data) {
+gboolean notify_loudness_threshold_callback(ShairportSync *skeleton,
+ __attribute__((unused)) gpointer user_data) {
gdouble th = shairport_sync_get_loudness_threshold(skeleton);
if ((th <= 0.0) && (th >= -100.0)) {
debug(1, "Setting loudness threshhold to %f.", th);
return TRUE;
}
-gboolean notify_volume_callback(ShairportSync *skeleton, gpointer user_data) {
+gboolean notify_volume_callback(ShairportSync *skeleton,
+ __attribute__((unused)) gpointer user_data) {
gint gvo = shairport_sync_get_volume(skeleton);
int32_t vo = gvo;
if ((vo >= 0) && (vo <= 100)) {
}
static gboolean on_handle_remote_command(ShairportSync *skeleton, GDBusMethodInvocation *invocation,
- const gchar *command, gpointer user_data) {
+ const gchar *command,
+ __attribute__((unused)) gpointer user_data) {
debug(1, "RemoteCommand with command \"%s\".", command);
send_simple_dacp_command((const char *)command);
shairport_sync_complete_remote_command(skeleton, invocation);
}
static void on_dbus_name_acquired(GDBusConnection *connection, const gchar *name,
- gpointer user_data) {
+ __attribute__((unused)) gpointer user_data) {
// debug(1, "Shairport Sync native D-Bus interface \"%s\" acquired on the %s bus.", name,
// (config.dbus_service_bus_type == DBT_session) ? "session" : "system");
(config.dbus_service_bus_type == DBT_session) ? "session" : "system");
}
-static void on_dbus_name_lost_again(GDBusConnection *connection, const gchar *name,
- gpointer user_data) {
+static void on_dbus_name_lost_again(__attribute__((unused)) GDBusConnection *connection,
+ __attribute__((unused)) const gchar *name,
+ __attribute__((unused)) gpointer user_data) {
warn("Could not acquire a Shairport Sync native D-Bus interface \"%s\" on the %s bus.", name,
(config.dbus_service_bus_type == DBT_session) ? "session" : "system");
}
-static void on_dbus_name_lost(GDBusConnection *connection, const gchar *name, gpointer user_data) {
+static void on_dbus_name_lost(__attribute__((unused)) GDBusConnection *connection,
+ __attribute__((unused)) const gchar *name,
+ __attribute__((unused)) gpointer user_data) {
// debug(1, "Could not acquire a Shairport Sync native D-Bus interface \"%s\" on the %s bus --
// will try adding the process "
// "number to the end of it.",
static void resolve_callback(AvahiServiceResolver *r, AVAHI_GCC_UNUSED AvahiIfIndex interface,
AVAHI_GCC_UNUSED AvahiProtocol protocol, AvahiResolverEvent event,
const char *name, const char *type, const char *domain,
- const char *host_name, const AvahiAddress *address, uint16_t port,
- AvahiStringList *txt, AvahiLookupResultFlags flags, void *userdata) {
+ __attribute__((unused)) const char *host_name,
+ __attribute__((unused)) const AvahiAddress *address, uint16_t port,
+ __attribute__((unused)) AvahiStringList *txt,
+ __attribute__((unused)) AvahiLookupResultFlags flags, void *userdata) {
assert(r);
rtsp_conn_info *conn = (rtsp_conn_info *)userdata;
}
}
-static int mdns_external_avahi_register(char *apname, int port) {
+static int mdns_external_avahi_register(char *apname, __attribute__((unused)) int port) {
char mdns_port[6];
sprintf(mdns_port, "%d", config.port);
return -1;
}
-static int mdns_external_dns_sd_register(char *apname, int port) {
+static int mdns_external_dns_sd_register(char *apname, __attribute__((unused)) int port) {
char mdns_port[6];
sprintf(mdns_port, "%d", config.port);
#include "metadata_hub.h"
#include "mpris-service.h"
-void mpris_metadata_watcher(struct metadata_bundle *argc, void *userdata) {
+void mpris_metadata_watcher(struct metadata_bundle *argc, __attribute__((unused)) void *userdata) {
// debug(1, "MPRIS metadata watcher called");
char response[100];
}
static gboolean on_handle_next(MediaPlayer2Player *skeleton, GDBusMethodInvocation *invocation,
- gpointer user_data) {
+ __attribute__((unused)) gpointer user_data) {
send_simple_dacp_command("nextitem");
media_player2_player_complete_next(skeleton, invocation);
return TRUE;
}
static gboolean on_handle_previous(MediaPlayer2Player *skeleton, GDBusMethodInvocation *invocation,
- gpointer user_data) {
+ __attribute__((unused)) gpointer user_data) {
send_simple_dacp_command("previtem");
media_player2_player_complete_previous(skeleton, invocation);
return TRUE;
}
static gboolean on_handle_stop(MediaPlayer2Player *skeleton, GDBusMethodInvocation *invocation,
- gpointer user_data) {
+ __attribute__((unused)) gpointer user_data) {
send_simple_dacp_command("stop");
media_player2_player_complete_stop(skeleton, invocation);
return TRUE;
}
static gboolean on_handle_pause(MediaPlayer2Player *skeleton, GDBusMethodInvocation *invocation,
- gpointer user_data) {
+ __attribute__((unused)) gpointer user_data) {
send_simple_dacp_command("pause");
media_player2_player_complete_pause(skeleton, invocation);
return TRUE;
}
static gboolean on_handle_play_pause(MediaPlayer2Player *skeleton,
- GDBusMethodInvocation *invocation, gpointer user_data) {
+ GDBusMethodInvocation *invocation,
+ __attribute__((unused)) gpointer user_data) {
send_simple_dacp_command("playpause");
media_player2_player_complete_play_pause(skeleton, invocation);
return TRUE;
}
static gboolean on_handle_play(MediaPlayer2Player *skeleton, GDBusMethodInvocation *invocation,
- gpointer user_data) {
+ __attribute__((unused)) gpointer user_data) {
send_simple_dacp_command("play");
media_player2_player_complete_play(skeleton, invocation);
return TRUE;
}
static void on_mpris_name_acquired(GDBusConnection *connection, const gchar *name,
- gpointer user_data) {
+ __attribute__((unused)) gpointer user_data) {
const char *empty_string_array[] = {NULL};
(config.mpris_service_bus_type == DBT_session) ? "session" : "system");
}
-static void on_mpris_name_lost_again(GDBusConnection *connection, const gchar *name,
- gpointer user_data) {
+static void on_mpris_name_lost_again(__attribute__((unused)) GDBusConnection *connection,
+ const gchar *name,
+ __attribute__((unused)) gpointer user_data) {
warn("Could not acquire an MPRIS interface named \"%s\" on the %s bus.", name,
(config.mpris_service_bus_type == DBT_session) ? "session" : "system");
}
-static void on_mpris_name_lost(GDBusConnection *connection, const gchar *name, gpointer user_data) {
+static void on_mpris_name_lost(__attribute__((unused)) GDBusConnection *connection,
+ __attribute__((unused)) const gchar *name,
+ __attribute__((unused)) gpointer user_data) {
// debug(1, "Could not acquire MPRIS interface \"%s\" on the %s bus -- will try adding the process
// "
// "number to the end of it.",
uint64_t packet_count;
int connection_state_to_output;
int player_thread_please_stop;
- int64_t first_packet_time_to_play, time_since_play_started; // nanoseconds
+ uint64_t first_packet_time_to_play;
+ int64_t time_since_play_started; // nanoseconds
// stats
uint64_t missing_packets, late_packets, too_late_packets, resend_requests;
int decoder_in_use;
#include "player.h"
#include "rtp.h"
-uint64_t static local_to_remote_time_jitters;
-uint64_t static local_to_remote_time_jitters_count;
+uint64_t local_to_remote_time_jitters;
+uint64_t local_to_remote_time_jitters_count;
void memory_barrier();
typedef struct {
uint32_t referenceCount; // we might start using this...
- int nheaders;
+ unsigned int nheaders;
char *name[16];
char *value[16];
}
static char *msg_get_header(rtsp_message *msg, char *name) {
- int i;
+ unsigned int i;
for (i = 0; i < msg->nheaders; i++)
if (!strcasecmp(msg->name[i], name))
return msg->value[i];
}
static void debug_print_msg_headers(int level, rtsp_message *msg) {
- int i;
+ unsigned int i;
for (i = 0; i < msg->nheaders; i++) {
debug(level, " Type: \"%s\", content: \"%s\"", msg->name[i], msg->value[i]);
}
if (rc)
debug(1, "Error %d unlocking reference counter lock during msg_free()", rc);
if (msg->referenceCount == 0) {
- int i;
+ unsigned int i;
for (i = 0; i < msg->nheaders; i++) {
free(msg->name[i]);
free(msg->value[i]);
reply = rtsp_read_request_response_immediate_shutdown_requested;
goto shutdown;
}
- ssize_t read_chunk = msg_size - inbuf;
+ size_t read_chunk = msg_size - inbuf;
if (read_chunk > max_read_chunk)
read_chunk = max_read_chunk;
usleep(40000); // wait about 40 milliseconds between reads of up to about 64 kB
char pkt[2048];
int pktfree = sizeof(pkt);
char *p = pkt;
- int i, n;
+ int n;
+ unsigned int i;
n = snprintf(p, pktfree, "RTSP/1.0 %d %s\r\n", resp->respcode,
resp->respcode == 200 ? "OK" : "Unauthorized");
// usleep(500000);
}
-static void handle_options(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
+static void handle_options(rtsp_conn_info *conn, __attribute__((unused)) rtsp_message *req,
+ rtsp_message *resp) {
debug(3, "Connection %d: OPTIONS", conn->connection_number);
resp->respcode = 200;
msg_add_header(resp, "Public", "ANNOUNCE, SETUP, RECORD, "
"OPTIONS, GET_PARAMETER, SET_PARAMETER");
}
-static void handle_teardown(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
+static void handle_teardown(rtsp_conn_info *conn, __attribute__((unused)) rtsp_message *req,
+ rtsp_message *resp) {
debug(2, "Connection %d: TEARDOWN", conn->connection_number);
// if (!rtsp_playing())
// debug(1, "This RTSP connection thread (%d) doesn't think it's playing, but "
*/
static void handle_set_parameter_parameter(rtsp_conn_info *conn, rtsp_message *req,
- rtsp_message *resp) {
+ __attribute__((unused)) rtsp_message *resp) {
char *cp = req->content;
int cp_left = req->contentlength;
char *next;
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'};
-static int mod_table[] = {0, 2, 1};
+static size_t mod_table[] = {0, 2, 1};
// pass in a pointer to the data, its length, a pointer to the output buffer and
// a pointer to an int
return (NULL);
*output_length = calculated_output_length;
- int i, j;
+ size_t i, j;
for (i = 0, j = 0; i < input_length;) {
uint32_t octet_a = i < input_length ? (unsigned char)data[i++] : 0;
v = htonl(code);
memcpy(ptr, &v, 4);
ptr += 4;
- uint32_t datalen = remaining;
+ size_t datalen = remaining;
if (datalen > config.metadata_sockmsglength - 24) {
datalen = config.metadata_sockmsglength - 24;
}
}
}
-void *metadata_thread_function(void *ignore) {
+void *metadata_thread_function(__attribute__((unused)) void *ignore) {
metadata_create();
metadata_package pack;
while (1) {
return rc;
}
-static void handle_set_parameter_metadata(rtsp_conn_info *conn, rtsp_message *req,
- rtsp_message *resp) {
+static void handle_set_parameter_metadata(__attribute__((unused)) rtsp_conn_info *conn,
+ rtsp_message *req,
+ __attribute__((unused)) rtsp_message *resp) {
char *cp = req->content;
- int cl = req->contentlength;
+ unsigned int cl = req->contentlength;
unsigned int off = 8;
#endif
-static void handle_get_parameter(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
+static void handle_get_parameter(__attribute__((unused)) rtsp_conn_info *conn, rtsp_message *req,
+ rtsp_message *resp) {
// debug(1, "Connection %d: GET_PARAMETER", conn->connection_number);
// debug_print_msg_headers(1,req);
// debug_print_msg_content(1,req);
memcpy(conn->stream.aeskey, aeskey, 16);
free(aeskey);
}
- int i;
+ unsigned int i;
for (i = 0; i < sizeof(conn->stream.fmtp) / sizeof(conn->stream.fmtp[0]); i++)
conn->stream.fmtp[i] = atoi(strsep(&pfmtp, " \t"));
// here we should check the sanity ot the fmtp values
GMainLoop *loop;
-void on_properties_changed(GDBusProxy *proxy, GVariant *changed_properties,
- const gchar *const *invalidated_properties, gpointer user_data) {
+void on_properties_changed(__attribute__((unused)) GDBusProxy *proxy, GVariant *changed_properties,
+ const gchar *const *invalidated_properties,
+ __attribute__((unused)) gpointer user_data) {
/* Note that we are guaranteed that changed_properties and
* invalidated_properties are never NULL
*/
}
}
-void notify_loudness_filter_active_callback(ShairportSync *proxy, gpointer user_data) {
+void notify_loudness_filter_active_callback(ShairportSync *proxy,
+ __attribute__((unused)) gpointer user_data) {
// printf("\"notify_loudness_filter_active_callback\" called with a gpointer of
// %lx.\n",(int64_t)user_data);
gboolean ebl = shairport_sync_get_loudness_filter_active(proxy);
printf("Client reports loudness is disabled.\n");
}
-void notify_loudness_threshold_callback(ShairportSync *proxy, gpointer user_data) {
+void notify_loudness_threshold_callback(ShairportSync *proxy,
+ __attribute__((unused)) gpointer user_data) {
gdouble th = shairport_sync_get_loudness_threshold(proxy);
printf("Client reports loudness threshold set to %.2f dB.\n", th);
}
-void notify_volume_callback(ShairportSync *proxy, gpointer user_data) {
+void notify_volume_callback(ShairportSync *proxy, __attribute__((unused)) gpointer user_data) {
gdouble th = shairport_sync_get_volume(proxy);
printf("Client reports volume set to %.2f.\n", th);
}
pthread_t dbus_thread;
-void *dbus_thread_func(void *arg) {
+void *dbus_thread_func(__attribute__((unused)) void *arg) {
loop = g_main_loop_new(NULL, FALSE);
"Listen on the D-Bus session bus -- pick this option or the \'--system\' option, but not "
"both.",
NULL},
- POPT_AUTOHELP{NULL, 0, 0, NULL, 0}};
+ POPT_AUTOHELP{NULL, 0, 0, NULL, 0, NULL, NULL}};
optCon = poptGetContext(NULL, argc, (const char **)argv, optionsTable, 0);
poptSetOtherOptionHelp(optCon, "[--system | --session]");
GMainLoop *loop;
-void on_properties_changed(GDBusProxy *proxy, GVariant *changed_properties,
- const gchar *const *invalidated_properties, gpointer user_data) {
+void on_properties_changed(__attribute__((unused)) GDBusProxy *proxy, GVariant *changed_properties,
+ const gchar *const *invalidated_properties,
+ __attribute__((unused)) gpointer user_data) {
/* Note that we are guaranteed that changed_properties and
* invalidated_properties are never NULL
*/
}
pthread_t dbus_thread;
-void *dbus_thread_func(void *arg) {
+void *dbus_thread_func(__attribute__((unused)) void *arg) {
loop = g_main_loop_new(NULL, FALSE);
"Listen on the D-Bus session bus -- pick this option or the \'--system\' option, but not "
"both.",
NULL},
- POPT_AUTOHELP{NULL, 0, 0, NULL, 0}};
+ POPT_AUTOHELP{NULL, 0, 0, NULL, 0, NULL, NULL}};
optCon = poptGetContext(NULL, argc, (const char **)argv, optionsTable, 0);
poptSetOtherOptionHelp(optCon, "[--system | --session]");
config.output->deinit();
}
-static void sig_ignore(int foo, siginfo_t *bar, void *baz) {}
-static void sig_shutdown(int foo, siginfo_t *bar, void *baz) {
+static void sig_ignore(__attribute__((unused)) int foo, __attribute__((unused)) siginfo_t *bar,
+ __attribute__((unused)) void *baz) {}
+static void sig_shutdown(__attribute__((unused)) int foo, __attribute__((unused)) siginfo_t *bar,
+ __attribute__((unused)) void *baz) {
debug(1, "shutdown requested...");
shairport_shutdown();
// daemon_log(LOG_NOTICE, "exit...");
exit(0);
}
-static void sig_child(int foo, siginfo_t *bar, void *baz) {
+static void sig_child(__attribute__((unused)) int foo, __attribute__((unused)) siginfo_t *bar,
+ __attribute__((unused)) void *baz) {
pid_t pid;
while ((pid = waitpid((pid_t)-1, 0, WNOHANG)) > 0) {
if (pid == mdns_pid && !shutting_down) {
}
}
-static void sig_disconnect_audio_output(int foo, siginfo_t *bar, void *baz) {
+static void sig_disconnect_audio_output(__attribute__((unused)) int foo,
+ __attribute__((unused)) siginfo_t *bar,
+ __attribute__((unused)) void *baz) {
debug(1, "disconnect audio output requested.");
set_requested_connection_state_to_output(0);
}
-static void sig_connect_audio_output(int foo, siginfo_t *bar, void *baz) {
+static void sig_connect_audio_output(__attribute__((unused)) int foo,
+ __attribute__((unused)) siginfo_t *bar,
+ __attribute__((unused)) void *baz) {
debug(1, "connect audio output requested.");
set_requested_connection_state_to_output(1);
}
int daemonisewith = 0;
int daemonisewithout = 0;
struct poptOption optionsTable[] = {
- {"verbose", 'v', POPT_ARG_NONE, NULL, 'v', NULL},
- {"disconnectFromOutput", 'D', POPT_ARG_NONE, NULL, 0, NULL},
- {"reconnectToOutput", 'R', POPT_ARG_NONE, NULL, 0, NULL},
- {"kill", 'k', POPT_ARG_NONE, NULL, 0, NULL},
- {"daemon", 'd', POPT_ARG_NONE, &daemonisewith, 0, NULL},
- {"justDaemoniseNoPIDFile", 'j', POPT_ARG_NONE, &daemonisewithout, 0, NULL},
- {"configfile", 'c', POPT_ARG_STRING, &config.configfile, 0, NULL},
- {"statistics", 0, POPT_ARG_NONE, &config.statistics_requested, 0, NULL},
- {"logOutputLevel", 0, POPT_ARG_NONE, &config.logOutputLevel, 0, NULL},
- {"version", 'V', POPT_ARG_NONE, NULL, 0, NULL},
- {"port", 'p', POPT_ARG_INT, &config.port, 0, NULL},
- {"name", 'a', POPT_ARG_STRING, &raw_service_name, 0, NULL},
- {"output", 'o', POPT_ARG_STRING, &config.output_name, 0, NULL},
- {"on-start", 'B', POPT_ARG_STRING, &config.cmd_start, 0, NULL},
- {"on-stop", 'E', POPT_ARG_STRING, &config.cmd_stop, 0, NULL},
- {"wait-cmd", 'w', POPT_ARG_NONE, &config.cmd_blocking, 0, NULL},
- {"mdns", 'm', POPT_ARG_STRING, &config.mdns_name, 0, NULL},
- {"latency", 'L', POPT_ARG_INT, &config.userSuppliedLatency, 0, NULL},
- {"stuffing", 'S', POPT_ARG_STRING, &stuffing, 'S', NULL},
- {"resync", 'r', POPT_ARG_INT, &fResyncthreshold, 0, NULL},
- {"timeout", 't', POPT_ARG_INT, &config.timeout, 't', NULL},
- {"password", 0, POPT_ARG_STRING, &config.password, 0, NULL},
- {"tolerance", 'z', POPT_ARG_INT, &fTolerance, 0, NULL},
+ {"verbose", 'v', POPT_ARG_NONE, NULL, 'v', NULL, NULL},
+ {"disconnectFromOutput", 'D', POPT_ARG_NONE, NULL, 0, NULL, NULL},
+ {"reconnectToOutput", 'R', POPT_ARG_NONE, NULL, 0, NULL, NULL},
+ {"kill", 'k', POPT_ARG_NONE, NULL, 0, NULL, NULL},
+ {"daemon", 'd', POPT_ARG_NONE, &daemonisewith, 0, NULL, NULL},
+ {"justDaemoniseNoPIDFile", 'j', POPT_ARG_NONE, &daemonisewithout, 0, NULL, NULL},
+ {"configfile", 'c', POPT_ARG_STRING, &config.configfile, 0, NULL, NULL},
+ {"statistics", 0, POPT_ARG_NONE, &config.statistics_requested, 0, NULL, NULL},
+ {"logOutputLevel", 0, POPT_ARG_NONE, &config.logOutputLevel, 0, NULL, NULL},
+ {"version", 'V', POPT_ARG_NONE, NULL, 0, NULL, NULL},
+ {"port", 'p', POPT_ARG_INT, &config.port, 0, NULL, NULL},
+ {"name", 'a', POPT_ARG_STRING, &raw_service_name, 0, NULL, NULL},
+ {"output", 'o', POPT_ARG_STRING, &config.output_name, 0, NULL, NULL},
+ {"on-start", 'B', POPT_ARG_STRING, &config.cmd_start, 0, NULL, NULL},
+ {"on-stop", 'E', POPT_ARG_STRING, &config.cmd_stop, 0, NULL, NULL},
+ {"wait-cmd", 'w', POPT_ARG_NONE, &config.cmd_blocking, 0, NULL, NULL},
+ {"mdns", 'm', POPT_ARG_STRING, &config.mdns_name, 0, NULL, NULL},
+ {"latency", 'L', POPT_ARG_INT, &config.userSuppliedLatency, 0, NULL, NULL},
+ {"stuffing", 'S', POPT_ARG_STRING, &stuffing, 'S', NULL, NULL},
+ {"resync", 'r', POPT_ARG_INT, &fResyncthreshold, 0, NULL, NULL},
+ {"timeout", 't', POPT_ARG_INT, &config.timeout, 't', NULL, NULL},
+ {"password", 0, POPT_ARG_STRING, &config.password, 0, NULL, NULL},
+ {"tolerance", 'z', POPT_ARG_INT, &fTolerance, 0, NULL, NULL},
#ifdef CONFIG_METADATA
- {"metadata-pipename", 'M', POPT_ARG_STRING, &config.metadata_pipename, 'M', NULL},
- {"get-coverart", 'g', POPT_ARG_NONE, &config.get_coverart, 'g', NULL},
+ {"metadata-pipename", 'M', POPT_ARG_STRING, &config.metadata_pipename, 'M', NULL, NULL},
+ {"get-coverart", 'g', POPT_ARG_NONE, &config.get_coverart, 'g', NULL, NULL},
#endif
- POPT_AUTOHELP{NULL, 0, 0, NULL, 0}};
+ POPT_AUTOHELP{NULL, 0, 0, NULL, 0, NULL, NULL}};
// we have to parse the command line arguments to look for a config file
int optind;
GMainLoop *loop;
pthread_t dbus_thread;
-void *dbus_thread_func(void *arg) {
+void *dbus_thread_func(__attribute__((unused)) void *arg) {
loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(loop);
return NULL;