__unused is already defined on MacOS.
enum {E_SYNTAX, E_READ, E_WRITE, E_SOCKET, E_INIT_SOCK_ADDR, E_CONNECT, E_CREDENTIALS, E_SELECT, E_OVERRUN};
-void para_log(__unused int ll, __unused const char* fmt,...) /* no logging */
+void para_log(__a_unused int ll, __a_unused const char* fmt,...) /* no logging */
{
}
return ret;
}
-static int com_stat(int fd, __unused int argc, __unused char **argv)
+static int com_stat(int fd, __a_unused int argc, __a_unused char **argv)
{
int i, ret;
char *buf = NULL;
return 1;
}
-static int __noreturn com_term(int fd, __unused int argc, __unused char **argv)
+static int __noreturn com_term(int fd, __a_unused int argc, __a_unused char **argv)
{
close(fd);
clean_exit(EXIT_SUCCESS, "terminating on user request");
}
-static int com_on(int fd, __unused int argc, __unused char **argv)
+static int com_on(int fd, __a_unused int argc, __a_unused char **argv)
{
audiod_status = AUDIOD_ON;
close(fd);
return 1;
}
-static int com_off(int fd, __unused int argc, __unused char **argv)
+static int com_off(int fd, __a_unused int argc, __a_unused char **argv)
{
audiod_status = AUDIOD_OFF;
close(fd);
return 1;
}
-static int com_sb(int fd, __unused int argc, __unused char **argv)
+static int com_sb(int fd, __a_unused int argc, __a_unused char **argv)
{
audiod_status = AUDIOD_STANDBY;
close(fd);
/*
* do several cleanups on sigint
*/
-static void sigint_handler(__unused int i)
+static void sigint_handler(__a_unused int i)
{
rl_cleanup_after_signal();
rl_reset_after_signal();
}
};
-static void dummy(__unused int s)
+static void dummy(__a_unused int s)
{}
static void mmd_dup(struct misc_meta_data *new_mmd)
}
/* server info */
-static int com_si(int fd, int argc, __unused char **argv)
+static int com_si(int fd, int argc, __a_unused char **argv)
{
int i, ret;
char *ut;
}
/* version */
-static int com_version(int socket_fd, int argc, __unused char **argv)
+static int com_version(int socket_fd, int argc, __a_unused char **argv)
{
if (argc != 1)
return -E_COMMAND_SYNTAX;
}
/* hup */
-static int com_hup(__unused int socket_fd, int argc, __unused char **argv)
+static int com_hup(__a_unused int socket_fd, int argc, __a_unused char **argv)
{
if (argc != 1)
return -E_COMMAND_SYNTAX;
}
/* term */
-static int com_term(__unused int socket_fd, int argc, __unused char **argv)
+static int com_term(__a_unused int socket_fd, int argc, __a_unused char **argv)
{
if (argc != 1)
return -E_COMMAND_SYNTAX;
return 1;
}
-static int com_play(__unused int socket_fd, int argc, __unused char **argv)
+static int com_play(__a_unused int socket_fd, int argc, __a_unused char **argv)
{
if (argc != 1)
return -E_COMMAND_SYNTAX;
}
/* stop */
-static int com_stop(__unused int socket_fd, int argc, __unused char **argv)
+static int com_stop(__a_unused int socket_fd, int argc, __a_unused char **argv)
{
if (argc != 1)
return -E_COMMAND_SYNTAX;
}
/* pause */
-static int com_pause(__unused int socket_fd, int argc, __unused char **argv)
+static int com_pause(__a_unused int socket_fd, int argc, __a_unused char **argv)
{
if (argc != 1)
return -E_COMMAND_SYNTAX;
}
/* next */
-static int com_next(__unused int socket_fd, int argc, __unused char **argv)
+static int com_next(__a_unused int socket_fd, int argc, __a_unused char **argv)
{
if (argc != 1)
return -E_COMMAND_SYNTAX;
}
/* nomore */
-static int com_nomore(__unused int socket_fd, int argc, __unused char **argv)
+static int com_nomore(__a_unused int socket_fd, int argc, __a_unused char **argv)
{
if (argc != 1)
return -E_COMMAND_SYNTAX;
}
/* ff */
-static int com_ff(__unused int socket_fd, int argc, char **argv)
+static int com_ff(__a_unused int socket_fd, int argc, char **argv)
{
long promille;
int ret, backwards = 0;
}
/* jmp */
-static int com_jmp(__unused int socket_fd, int argc, char **argv)
+static int com_jmp(__a_unused int socket_fd, int argc, char **argv)
{
long unsigned int i;
int ret;
static char **choices;
/* no looging */
-void para_log(__unused int ll, __unused const char *fmt,...)
+void para_log(__a_unused int ll, __a_unused const char *fmt,...)
{
}
return buf;
}
-static void _item_init(__unused MENU* menu)
+static void _item_init(__a_unused MENU* menu)
{
// static int subsequent_run;
int i, n;
}
static int dccp_recv_pre_select(struct receiver_node *rn, fd_set *rfds,
- __unused fd_set *wfds, __unused struct timeval *timeout)
+ __a_unused fd_set *wfds, __a_unused struct timeval *timeout)
{
struct private_dccp_recv_data *pdd = rn->private_data;
}
static int dccp_recv_post_select(struct receiver_node *rn, int select_ret,
- fd_set *rfds, __unused fd_set *wfds)
+ fd_set *rfds, __a_unused fd_set *wfds)
{
int ret;
struct private_dccp_recv_data *pdd = rn->private_data;
int header_sent;
};
-static void dccp_pre_select(__unused struct audio_format *af, int *max_fileno, fd_set *rfds,
- __unused fd_set *wfds)
+static void dccp_pre_select(__a_unused struct audio_format *af, int *max_fileno, fd_set *rfds,
+ __a_unused fd_set *wfds)
{
if (listen_fd < 0)
return;
*max_fileno = MAX(*max_fileno, listen_fd);
}
-static void dccp_post_select(__unused struct audio_format *af, fd_set *rfds,
- __unused fd_set *wfds)
+static void dccp_post_select(__a_unused struct audio_format *af, fd_set *rfds,
+ __a_unused fd_set *wfds)
{
struct dccp_client *dc;
int ret;
return -E_DCCP_WRITE;
}
-static void dccp_send(__unused struct audio_format *af,
+static void dccp_send(__a_unused struct audio_format *af,
long unsigned current_chunk,
- __unused long unsigned chunks_sent, const char *buf, size_t len)
+ __a_unused long unsigned chunks_sent, const char *buf, size_t len)
{
struct dccp_client *dc, *tmp;
int ret, header_len;
struct gengetopt_args_info args_info;
-void para_log(__unused int ll, const char *fmt,...)
+void para_log(__a_unused int ll, const char *fmt,...)
{
va_list argp;
time_t t1;
# define __noreturn __attribute__ ((noreturn))
# define __malloc __attribute__ ((malloc))
# define __used __attribute__ ((used))
-# define __unused __attribute__ ((unused))
+# define __a_unused __attribute__ ((unused))
# define __packed __attribute__ ((packed))
# define likely(x) __builtin_expect (!!(x), 1)
# define unlikely(x) __builtin_expect (!!(x), 0)
# define __noreturn /* no noreturn */
# define __malloc /* no malloc */
# define __used /* no used */
-# define __unused /* no unused */
+# define __a__unused /* no unused */
# define __packed /* no packed */
# define likely(x) (x)
# define unlikely(x) (x)
}
static int http_pre_select(struct receiver_node *rn, fd_set *rfds, fd_set *wfds,
- __unused struct timeval *timeout)
+ __a_unused struct timeval *timeout)
{
struct private_http_recv_data *phd = rn->private_data;
return 1;
}
-static void http_send(__unused struct audio_format *af,
+static void http_send(__a_unused struct audio_format *af,
long unsigned current_chunk,
- __unused long unsigned chunks_sent, const char *buf, size_t len)
+ __a_unused long unsigned chunks_sent, const char *buf, size_t len)
{
struct http_client *hc, *tmp;
int ret;
return 0;
}
-static void http_post_select(__unused struct audio_format *af, fd_set *rfds,
+static void http_post_select(__a_unused struct audio_format *af, fd_set *rfds,
fd_set *wfds)
{
int i = -1, match;
return 1;
}
-static int http_com_on(__unused struct sender_command_data *scd)
+static int http_com_on(__a_unused struct sender_command_data *scd)
{
if (self->status == SENDER_ON)
return 1;
return open_tcp_port(conf.http_port_arg);
}
-static int http_com_off(__unused struct sender_command_data *scd)
+static int http_com_off(__a_unused struct sender_command_data *scd)
{
self->status = SENDER_OFF;
if (server_fd > 0) {
return chunk_size;
}
-static char *mp3_read_chunk(__unused long unsigned chunk_num, ssize_t *len)
+static char *mp3_read_chunk(__a_unused long unsigned chunk_num, ssize_t *len)
{
*len = mp3_read_next_chunk();
if (*len <= 0)
/*
* new attribute
*/
-static int com_na(__unused int fd, int argc, char *argv[])
+static int com_na(__a_unused int fd, int argc, char *argv[])
{
char *q, *tmp;
int ret;
/*
* delete attribute
*/
-static int com_da(__unused int fd, int argc, char *argv[])
+static int com_da(__a_unused int fd, int argc, char *argv[])
{
char *q, *tmp;
int ret;
/*
* list all attributes
*/
-static int com_laa(int fd, int argc, __unused char *argv[])
+static int com_laa(int fd, int argc, __a_unused char *argv[])
{
void *result;
int ret;
/*
* remove/add entries
*/
-static int com_rm_ne(__unused int fd, int argc, char *argv[])
+static int com_rm_ne(__a_unused int fd, int argc, char *argv[])
{
int ne = !strcmp(argv[0], "ne");
int i, ret;
/*
* mv: rename entry
*/
-static int com_mv(__unused int fd, int argc, char *argv[])
+static int com_mv(__a_unused int fd, int argc, char *argv[])
{
char *q, *dn, *ebn1 = NULL, *ebn2 = NULL, *edn = NULL;
int ret;
* picass: associate pic to audio file
* snp: set numplayed
*/
-static int com_set(__unused int fd, int argc, char *argv[])
+static int com_set(__a_unused int fd, int argc, char *argv[])
{
char *q, *ebn;
long unsigned id;
/*
* picch: change entry's name in pics table
*/
-static int com_picch(__unused int fd, int argc, char *argv[])
+static int com_picch(__a_unused int fd, int argc, char *argv[])
{
int ret;
long unsigned id;
/*
* piclist: print list of pics in db
*/
-static int com_piclist(__unused int fd, int argc, __unused char *argv[])
+static int com_piclist(__a_unused int fd, int argc, __a_unused char *argv[])
{
void *result = NULL;
MYSQL_ROW row;
}
/* strdel */
-static int com_strdel(__unused int fd, int argc, char *argv[])
+static int com_strdel(__a_unused int fd, int argc, char *argv[])
{
char *q, *tmp;
int ret;
/*
* summary
*/
-static int com_summary(__unused int fd, int argc, __unused char *argv[])
+static int com_summary(__a_unused int fd, int argc, __a_unused char *argv[])
{
MYSQL_ROW row;
MYSQL_ROW row2;
update_audio_file(name);
}
-static int com_us(__unused int fd, int argc, char *argv[])
+static int com_us(__a_unused int fd, int argc, char *argv[])
{
char *tmp;
int ret;
}
/* select previous/next stream */
-static int com_ps(__unused int fd, int argc, char *argv[])
+static int com_ps(__a_unused int fd, int argc, char *argv[])
{
char *query, *stream = get_current_stream();
void *result = get_result("select name from streams");
}
/* streams */
-static int com_streams(int fd, int argc, __unused char *argv[])
+static int com_streams(int fd, int argc, __a_unused char *argv[])
{
unsigned int num_rows;
int i, ret = -E_NORESULT;
/*
* verify / clean
*/
-static int com_vrfy(int fd, int argc, __unused char *argv[])
+static int com_vrfy(int fd, int argc, __a_unused char *argv[])
{
char *query;
int ret, vrfy_mode = strcmp(argv[0], "clean");
/*
* update database
*/
-static int com_upd(int fd, int argc, __unused char *argv[])
+static int com_upd(int fd, int argc, __a_unused char *argv[])
{
char *tempname = NULL, *query = NULL;
int ret, out_fd = -1, num = 0;
* Since we want the data source to be treated as unseekable at all
* times, the provided seek callback always returns -1 (failure).
*/
-static int cb_seek(__unused void *datasource, __unused ogg_int64_t offset,
- __unused int whence)
+static int cb_seek(__a_unused void *datasource, __a_unused ogg_int64_t offset,
+ __a_unused int whence)
{
return -1;
}
-static int cb_close(__unused void *datasource)
+static int cb_close(__a_unused void *datasource)
{
return 0;
}
};
static int ortp_recv_pre_select(struct receiver_node *rn,
- __unused fd_set *rfds, __unused fd_set *wfds,
+ __a_unused fd_set *rfds, __a_unused fd_set *wfds,
struct timeval *timeout)
{
struct private_ortp_recv_data *pord = rn->private_data;
static int ortp_recv_post_select(struct receiver_node *rn, int select_ret,
- __unused fd_set *rfds, __unused fd_set *wfds)
+ __a_unused fd_set *rfds, __a_unused fd_set *wfds)
{
struct private_ortp_recv_data *pord = rn->private_data;
mblk_t *mp;
static struct timeval *start_time;
static struct gengetopt_args_info conf;
-void para_log(__unused int ll, const char* fmt,...)
+void para_log(__a_unused int ll, const char* fmt,...)
{
va_list argp;
return ret;
}
-static int com_lpl(int fd, __unused int argc, __unused char *argv[])
+static int com_lpl(int fd, __a_unused int argc, __a_unused char *argv[])
{
unsigned loaded = 0;
size_t bufsize = 4096; /* guess that's enough */
return ret;
}
-static int com_ppl(int fd, __unused int argc, __unused char *argv[])
+static int com_ppl(int fd, __a_unused int argc, __a_unused char *argv[])
{
unsigned i;
playlist_size = 0;
}
-static void pls_post_select(__unused fd_set *rfds, __unused fd_set *wfds)
+static void pls_post_select(__a_unused fd_set *rfds, __a_unused fd_set *wfds)
{
struct private_pls_data *ppd = self->private_data;
struct pls_client_data *pcd = ppd->client_data;
static unsigned int num_audio_files, audio_file_count;
static char **audio_file_list;
-static int count_audio_files(__unused const char *dir, __unused const char *name)
+static int count_audio_files(__a_unused const char *dir, __a_unused const char *name)
{
num_audio_files++;
return 1;
}
};
-static int com_random_info(int fd, __unused int argc, __unused char *argv[])
+static int com_random_info(int fd, __a_unused int argc, __a_unused char *argv[])
{
return send_buffer(fd, "Don't use for huge directories as it is "
"very inefficient in this case.\n");
static struct stat_item stat_items[NUM_STAT_ITEMS];
-void para_log(__unused int ll, __unused const char* fmt,...) /* no logging */
+void para_log(__a_unused int ll, __a_unused const char* fmt,...) /* no logging */
{
}