From e0e5a7c1a04c6a2ee4a475e823657e06e6df2f99 Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 15 Apr 2006 17:36:57 +0200 Subject: [PATCH] gcc-compat.h: rename __unused to __a_unused __unused is already defined on MacOS. --- audioc.c | 2 +- audiod.c | 10 +++++----- client.c | 2 +- command.c | 24 ++++++++++++------------ dbadm.c | 4 ++-- dccp_recv.c | 4 ++-- dccp_send.c | 12 ++++++------ fade.c | 2 +- gcc-compat.h | 4 ++-- http_recv.c | 2 +- http_send.c | 10 +++++----- mp3.c | 2 +- mysql_selector.c | 30 +++++++++++++++--------------- oggdec.c | 6 +++--- ortp_recv.c | 4 ++-- play.c | 2 +- playlist_selector.c | 6 +++--- random_selector.c | 4 ++-- sdl_gui.c | 2 +- 19 files changed, 66 insertions(+), 66 deletions(-) diff --git a/audioc.c b/audioc.c index 93e91178..55314264 100644 --- a/audioc.c +++ b/audioc.c @@ -29,7 +29,7 @@ char *tmpfifo; 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 */ { } diff --git a/audiod.c b/audiod.c index 7596c5c5..0e5fed48 100644 --- a/audiod.c +++ b/audiod.c @@ -1243,7 +1243,7 @@ out: 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; @@ -1373,27 +1373,27 @@ err_out: 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); diff --git a/client.c b/client.c index 663f2206..a800f7d8 100644 --- a/client.c +++ b/client.c @@ -71,7 +71,7 @@ static char *rl_gets(void) /* * 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(); diff --git a/command.c b/command.c index 7df01083..1f94bbc2 100644 --- a/command.c +++ b/command.c @@ -309,7 +309,7 @@ static struct server_command cmd_struct[] = { } }; -static void dummy(__unused int s) +static void dummy(__a_unused int s) {} static void mmd_dup(struct misc_meta_data *new_mmd) @@ -554,7 +554,7 @@ static int com_sender(int fd, int argc, char **argv) } /* 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; @@ -606,7 +606,7 @@ static int com_si(int fd, int argc, __unused char **argv) } /* 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; @@ -791,7 +791,7 @@ static int com_help(int fd, int argc, char **argv) } /* 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; @@ -800,7 +800,7 @@ static int com_hup(__unused int socket_fd, int argc, __unused char **argv) } /* 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; @@ -808,7 +808,7 @@ static int com_term(__unused int socket_fd, int argc, __unused char **argv) 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; @@ -821,7 +821,7 @@ static int com_play(__unused int socket_fd, int argc, __unused char **argv) } /* 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; @@ -834,7 +834,7 @@ static int com_stop(__unused int socket_fd, int argc, __unused char **argv) } /* 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; @@ -873,7 +873,7 @@ static int com_chs(int fd, int argc, char **argv) } /* 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; @@ -885,7 +885,7 @@ static int com_next(__unused int socket_fd, int argc, __unused char **argv) } /* 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; @@ -897,7 +897,7 @@ static int com_nomore(__unused int socket_fd, int argc, __unused char **argv) } /* 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; @@ -936,7 +936,7 @@ out: } /* 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; diff --git a/dbadm.c b/dbadm.c index 5e7bf6e1..6b5a3e98 100644 --- a/dbadm.c +++ b/dbadm.c @@ -37,7 +37,7 @@ WINDOW *att_win; 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,...) { } @@ -99,7 +99,7 @@ static char *get_atts(char *filename) return buf; } -static void _item_init(__unused MENU* menu) +static void _item_init(__a_unused MENU* menu) { // static int subsequent_run; int i, n; diff --git a/dccp_recv.c b/dccp_recv.c index 679eb227..f7db6fc8 100644 --- a/dccp_recv.c +++ b/dccp_recv.c @@ -117,7 +117,7 @@ static void *dccp_recv_parse_config(int argc, char **argv) } 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; @@ -128,7 +128,7 @@ static int dccp_recv_pre_select(struct receiver_node *rn, fd_set *rfds, } 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; diff --git a/dccp_send.c b/dccp_send.c index 74976cf2..55548620 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -50,8 +50,8 @@ struct dccp_client { 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; @@ -59,8 +59,8 @@ static void dccp_pre_select(__unused struct audio_format *af, int *max_fileno, f *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; @@ -133,9 +133,9 @@ err_out: 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; diff --git a/fade.c b/fade.c index 94b86696..96ee22c0 100644 --- a/fade.c +++ b/fade.c @@ -36,7 +36,7 @@ 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; diff --git a/gcc-compat.h b/gcc-compat.h index 919748a8..f649c1d4 100644 --- a/gcc-compat.h +++ b/gcc-compat.h @@ -3,7 +3,7 @@ # 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) @@ -25,7 +25,7 @@ # 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) diff --git a/http_recv.c b/http_recv.c index da28faaa..49c10f95 100644 --- a/http_recv.c +++ b/http_recv.c @@ -90,7 +90,7 @@ static char *make_request_msg(void) } 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; diff --git a/http_send.c b/http_send.c index 276c0e41..926f7808 100644 --- a/http_send.c +++ b/http_send.c @@ -205,9 +205,9 @@ static int send_queued_packets(struct http_client *hc) 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; @@ -266,7 +266,7 @@ static int host_in_access_perm_list(struct http_client *hc) 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; @@ -398,14 +398,14 @@ static int open_tcp_port(int port) 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) { diff --git a/mp3.c b/mp3.c index ab8df7df..3f8eb009 100644 --- a/mp3.c +++ b/mp3.c @@ -474,7 +474,7 @@ static int mp3_read_next_chunk(void) 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) diff --git a/mysql_selector.c b/mysql_selector.c index 82f197cd..ff94d8d7 100644 --- a/mysql_selector.c +++ b/mysql_selector.c @@ -693,7 +693,7 @@ static char *escaped_basename(const char *name) /* * 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; @@ -714,7 +714,7 @@ static int com_na(__unused int fd, int argc, char *argv[]) /* * 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; @@ -865,7 +865,7 @@ static void *get_all_attributes(void) /* * 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; @@ -1465,7 +1465,7 @@ out: /* * 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; @@ -1487,7 +1487,7 @@ static int com_rm_ne(__unused int fd, int argc, char *argv[]) /* * 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; @@ -1545,7 +1545,7 @@ out: * 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; @@ -1573,7 +1573,7 @@ static int com_set(__unused int fd, int argc, char *argv[]) /* * 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; @@ -1596,7 +1596,7 @@ static int com_picch(__unused int fd, int argc, char *argv[]) /* * 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; @@ -1698,7 +1698,7 @@ out: } /* 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; @@ -1751,7 +1751,7 @@ static int com_ls(int fd, int argc, char *argv[]) /* * 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; @@ -1861,7 +1861,7 @@ static void update_audio_file_server_handler(char *name) 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; @@ -1892,7 +1892,7 @@ static void refresh_selector_info(void) } /* 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"); @@ -1959,7 +1959,7 @@ out: } /* 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; @@ -2265,7 +2265,7 @@ out: /* * 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"); @@ -2331,7 +2331,7 @@ static int mysql_write_tmp_file(const char *dir, const char *name) /* * 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; diff --git a/oggdec.c b/oggdec.c index 714d620e..b1ddd975 100644 --- a/oggdec.c +++ b/oggdec.c @@ -72,13 +72,13 @@ static size_t cb_read(void *buf, size_t size, size_t nmemb, void *datasource) * 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; } diff --git a/ortp_recv.c b/ortp_recv.c index 1e440420..887b8e73 100644 --- a/ortp_recv.c +++ b/ortp_recv.c @@ -67,7 +67,7 @@ uint32_t chunk_ts; }; 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; @@ -103,7 +103,7 @@ static void compute_next_chunk(struct timeval *now, unsigned chunk_time, 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; diff --git a/play.c b/play.c index fd8c9b28..713a1a69 100644 --- a/play.c +++ b/play.c @@ -67,7 +67,7 @@ static size_t bytes_per_frame; 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; diff --git a/playlist_selector.c b/playlist_selector.c index 86cae7b0..e5329bac 100644 --- a/playlist_selector.c +++ b/playlist_selector.c @@ -142,7 +142,7 @@ out: 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 */ @@ -173,7 +173,7 @@ out: 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; @@ -231,7 +231,7 @@ static void pls_shutdown(void) 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; diff --git a/random_selector.c b/random_selector.c index bdb82682..a90822c5 100644 --- a/random_selector.c +++ b/random_selector.c @@ -33,7 +33,7 @@ extern struct misc_meta_data *mmd; 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; @@ -64,7 +64,7 @@ static struct server_command cmds[] = { } }; -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"); diff --git a/sdl_gui.c b/sdl_gui.c index a1381c2f..a8c0327a 100644 --- a/sdl_gui.c +++ b/sdl_gui.c @@ -119,7 +119,7 @@ struct font fonts[] = { 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 */ { } -- 2.39.5