Mark some function parameters as unused to remove some compiler warnings diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/albumlist.c tunesbrowser-dsd/albumlist.c --- tunesbrowser-0.1.7-pre2/albumlist.c 2004-04-13 08:17:50.000000000 +0100 +++ tunesbrowser-dsd/albumlist.c 2004-12-11 03:57:56.505572168 +0000 @@ -107,7 +107,7 @@ int albumlist_clear() /* callback */ static void on_album_selection_changed(GtkTreeSelection *selection, - gpointer data) + UNUSED gpointer data) { GtkTreeIter iter; GtkTreeModel *model; @@ -134,7 +134,7 @@ static void on_album_selection_changed(G gint albumlist_default_sort(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, - gpointer user_data) + UNUSED gpointer user_data) { gchar *name[2]; gchar *name_s[2]; diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/artistlist.c tunesbrowser-dsd/artistlist.c --- tunesbrowser-0.1.7-pre2/artistlist.c 2004-04-13 08:17:50.000000000 +0100 +++ tunesbrowser-dsd/artistlist.c 2004-12-11 03:57:56.126629776 +0000 @@ -105,7 +105,7 @@ int artistlist_clear() /* callback */ static void on_artist_selection_changed(GtkTreeSelection *selection, - gpointer data) + UNUSED gpointer data) { GtkTreeIter iter; GtkTreeModel *model; @@ -132,7 +132,7 @@ static void on_artist_selection_changed( gint artistlist_default_sort(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, - gpointer user_data) + UNUSED gpointer user_data) { gchar *name[2]; gchar *name_s[2]; diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/audioplayer.c tunesbrowser-dsd/audioplayer.c --- tunesbrowser-0.1.7-pre2/audioplayer.c 2004-11-22 11:37:39.000000000 +0000 +++ tunesbrowser-dsd/audioplayer.c 2004-12-11 03:58:12.087203400 +0000 @@ -103,7 +103,7 @@ static char *get_state_str(GstElementSta return "unknown state"; } -static gboolean idle_async_cmd_queue_func(gpointer data) +static gboolean idle_async_cmd_queue_func(UNUSED gpointer data) { async_cmd_queue *cur; @@ -198,7 +198,7 @@ static void async_cmd_queue_add_daapcb_f /************* end gstreamer command setting **************************/ -static void cb_eos(GstElement *elem, gpointer data) +static void cb_eos(UNUSED GstElement *elem, UNUSED gpointer data) { if (!playing) return; /* already stopping */ playing = 0; @@ -206,16 +206,16 @@ static void cb_eos(GstElement *elem, gpo async_cmd_queue_add_daapcb_finished(); } -static void cb_error (GstElement *gstelement, - GstElement *arg1, - gpointer arg2, +static void cb_error (UNUSED GstElement *gstelement, + UNUSED GstElement *arg1, + UNUSED gpointer arg2, gchar *arg3, - gpointer user_data) + UNUSED gpointer user_data) { fprintf(stderr, "an error occured:\n%s\n\n", arg3); } -static void cb_iterate(GstBin *bin, gpointer data) +static void cb_iterate(GstBin *bin, UNUSED gpointer data) { GstClock *clock = gst_bin_get_clock(bin); int seconds = gst_clock_get_time(clock) / GST_SECOND; diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/daap.c tunesbrowser-dsd/daap.c --- tunesbrowser-0.1.7-pre2/daap.c 2004-12-11 04:01:50.885940936 +0000 +++ tunesbrowser-dsd/daap.c 2004-12-11 04:00:07.723623992 +0000 @@ -49,14 +49,12 @@ DAAP_SClient *clientInst; static int pipefds[2] = {-1, -1}; /* used for download */ DAAP_Status curstatus = DAAP_STATUS_idle; -void StatusCB(DAAP_SClient *client, DAAP_Status status, - int pos, void* context) +void StatusCB(UNUSED DAAP_SClient *client, DAAP_Status status, + UNUSED int pos, UNUSED void* context) { if (curstatus == DAAP_STATUS_downloading && status == DAAP_STATUS_idle) { - char fake = 1; - /* close to send EOF */ close(pipefds[1]); pipefds[1] = -1; @@ -210,7 +208,8 @@ static gint updateDatabases(DAAP_SClient return num_databases; } -int addDAAPEnumCB(DAAP_SClient *client, DAAP_SClientHost *host, void *ctx) +int addDAAPEnumCB(UNUSED DAAP_SClient *client, DAAP_SClientHost *host, + UNUSED void *ctx) { gchar *buf; int size; @@ -696,7 +695,6 @@ void daap_playnext_ifstillvisible() void daap_audiocb_finished() { - char fake = 0; /* close the pipe */ set_songstatus(STOPPED, -1); close(pipefds[0]); diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/main.c tunesbrowser-dsd/main.c --- tunesbrowser-0.1.7-pre2/main.c 2004-11-22 11:28:56.000000000 +0000 +++ tunesbrowser-dsd/main.c 2004-12-11 04:01:30.227081560 +0000 @@ -34,7 +34,7 @@ /********** signal handlers ****************/ -static void sighandler_sigsegv(int number, siginfo_t *siginfo, void *ucontext) +static void sighandler_sigsegv(UNUSED int number, siginfo_t *siginfo, UNUSED void *ucontext) { fprintf(stderr, "Oops! TunesBrowser has crashed. Sorry about that!\n"); fprintf(stderr, "This probably won't be of any use unless you feel like debugging,\n"); @@ -47,7 +47,7 @@ static void sighandler_sigsegv(int numbe exit(EXIT_FAILURE); } -static void sighandler_sigpipe(int number, siginfo_t *siginfo, void *ucontext) +static void sighandler_sigpipe(UNUSED int number, UNUSED siginfo_t *siginfo, UNUSED void *ucontext) { fprintf(stderr, "Oops! TunesBrowser has crashed. Sorry about that!\n"); fprintf(stderr, "I crashed because of a broken pipe! Better call a plumber.\n"); @@ -75,8 +75,8 @@ static void install_sighandlers() /*******************************************/ -void on_tunesbrowser_win_destroy(GtkObject *object, - gpointer user_data) +void on_tunesbrowser_win_destroy(UNUSED GtkObject *object, + UNUSED gpointer user_data) { printf("exiting\n"); gtk_main_quit(); diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/misc_ui.c tunesbrowser-dsd/misc_ui.c --- tunesbrowser-0.1.7-pre2/misc_ui.c 2004-10-30 14:39:03.000000000 +0100 +++ tunesbrowser-dsd/misc_ui.c 2004-12-11 04:04:04.388645440 +0000 @@ -158,9 +158,9 @@ static void cb_update_songpos() } /********* callback pump ***********/ -static gboolean ui_update_cb(GIOChannel *source, +static gboolean ui_update_cb(UNUSED GIOChannel *source, GIOCondition condition, - gpointer data) + UNUSED gpointer data) { enum UPDATE_TYPE type; int ret; @@ -189,7 +189,7 @@ static gboolean ui_update_cb(GIOChannel } /********** standard callbacks *******/ -void on_playpause_clicked(GtkButton *playpause, gpointer user_data) +void on_playpause_clicked(UNUSED GtkButton *playpause, UNUSED gpointer user_data) { if (currentStatus == PLAYING) { diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/songlist.c tunesbrowser-dsd/songlist.c --- tunesbrowser-0.1.7-pre2/songlist.c 2004-11-02 01:57:27.000000000 +0000 +++ tunesbrowser-dsd/songlist.c 2004-12-11 04:04:20.910133792 +0000 @@ -280,19 +280,19 @@ void songlist_set_playing_id(int id) } /* callbacks */ -static void on_song_row_activated(GtkTreeView *treeview, - GtkTreePath *arg1, - GtkTreeViewColumn *arg2, - gpointer user_data) +static void on_song_row_activated(UNUSED GtkTreeView *treeview, + UNUSED GtkTreePath *arg1, + UNUSED GtkTreeViewColumn *arg2, + UNUSED gpointer user_data) { play_daap_song(songlist_get_selected_id()); } /* sort funcs */ -gint songlist_default_sort(GtkTreeModel *model, - GtkTreeIter *a, - GtkTreeIter *b, - gpointer user_data) +gint songlist_default_sort(UNUSED GtkTreeModel *model, + UNUSED GtkTreeIter *a, + UNUSED GtkTreeIter *b, + UNUSED gpointer user_data) { #ifndef SLOW_SORT return 0; diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/sourcelist.c tunesbrowser-dsd/sourcelist.c --- tunesbrowser-0.1.7-pre2/sourcelist.c 2004-12-11 04:01:50.886940784 +0000 +++ tunesbrowser-dsd/sourcelist.c 2004-12-11 03:56:29.556790392 +0000 @@ -22,7 +22,6 @@ * */ - #include #include #include @@ -192,7 +191,7 @@ gboolean sourcelist_set_source_connect_s /* callback */ static void on_source_selection_changed(GtkTreeSelection *selection, - gpointer data) + UNUSED gpointer data) { GtkTreeIter iter; GtkTreeModel *model; @@ -210,7 +209,7 @@ static void on_source_selection_changed( } -static gboolean set_all_marked_fe(GtkTreeModel *model, GtkTreePath *path, +static gboolean set_all_marked_fe(GtkTreeModel *model, UNUSED GtkTreePath *path, GtkTreeIter *iter, gpointer mark) { gtk_list_store_set(GTK_LIST_STORE(model), iter, diff -X dontdiff -urNp tunesbrowser-0.1.7-pre2/tunesbrowser.h tunesbrowser-dsd/tunesbrowser.h --- tunesbrowser-0.1.7-pre2/tunesbrowser.h 2004-12-11 04:01:50.887940632 +0000 +++ tunesbrowser-dsd/tunesbrowser.h 2004-12-11 03:56:13.168281824 +0000 @@ -26,6 +26,8 @@ #ifndef __TUNESBROWSER_H #define __TUNESBROWSER_H +#define UNUSED __attribute__ ((unused)) + void init_daap(); void init_daap_sources(); void set_daap_sources(DAAP_SClientHost *host);