summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c67c968)
raw | patch | inline | side by side (parent: c67c968)
author | Max Kellermann <max@duempel.org> | |
Mon, 15 Sep 2008 11:27:32 +0000 (13:27 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 15 Sep 2008 11:27:32 +0000 (13:27 +0200) |
Add the "unused" attribute to all function parameters which are indeed
going to be ignored.
going to be ignored.
diff --git a/src/main.c b/src/main.c
index 7350a50f69b9a8ac1c32bc6ba032f737db1e2c6c..b16cab889bc3e1dd424a33a291bf178aa7c85371 100644 (file)
--- a/src/main.c
+++ b/src/main.c
#include "screen.h"
#include "screen_utils.h"
#include "strfsong.h"
+#include "gcc.h"
#include <stdlib.h>
#include <unistd.h>
}
static void
-error_callback(mpdclient_t *c, gint error, const gchar *msg)
+error_callback(mpd_unused mpdclient_t *c, gint error, const gchar *msg)
{
- gint code = GET_ACK_ERROR_CODE(error);
-
error = error & 0xFF;
- D("Error [%d:%d]> \"%s\"\n", error, code, msg);
+ D("Error [%d:%d]> \"%s\"\n", error, GET_ACK_ERROR_CODE(error), msg);
switch (error) {
case MPD_ERROR_CONNPORT:
case MPD_ERROR_NORESPONSE:
}
static void
-catch_sigint( int sig )
+catch_sigint(mpd_unused int sig)
{
printf("\n%s\n", _("Exiting..."));
exit(EXIT_SUCCESS);
static void
-catch_sigcont( int sig )
+catch_sigcont(mpd_unused int sig)
{
D("catch_sigcont()\n");
#ifdef ENABLE_RAW_MODE
diff --git a/src/screen_clock.c b/src/screen_clock.c
index a929532622c9184465f8a9b1e1df0a68258f933e..995be67926fcdcf40cc867f107259723a850b875 100644 (file)
--- a/src/screen_clock.c
+++ b/src/screen_clock.c
#include "command.h"
#include "screen.h"
#include "screen_utils.h"
+#include "gcc.h"
#include <time.h>
#include <stdlib.h>
}
static void
-clock_open(screen_t *screen, mpdclient_t *c)
+clock_open(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
int j;
}
static const char *
-clock_title(char *str, size_t size)
+clock_title(mpd_unused char *str, mpd_unused size_t size)
{
return _("Clock");
}
static void
-clock_update(screen_t *screen, mpdclient_t *c)
+clock_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
time_t now;
struct tm *tm;
}
static int
-clock_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
+clock_cmd(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c,
+ mpd_unused command_t cmd)
{
return 0;
}
diff --git a/src/screen_file.c b/src/screen_file.c
index c00ccba44bdd5f0b68d89e0737344831f515733a..c480961c4b9ebab4cde59bce4b315d9302a98687 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
#include "screen_utils.h"
#include "screen_browse.h"
#include "screen_play.h"
+#include "gcc.h"
#include <ctype.h>
#include <stdlib.h>
/* the db have changed -> update the filelist */
static void
-file_changed_callback(mpdclient_t *c, int event, gpointer data)
+file_changed_callback(mpdclient_t *c, mpd_unused int event,
+ mpd_unused gpointer data)
{
D("screen_file.c> filelist_callback() [%d]\n", event);
filelist = mpdclient_filelist_update(c, filelist);
/* chdir */
static int
-change_directory(screen_t *screen, mpdclient_t *c, filelist_entry_t *entry,
- const char *new_path)
+change_directory(mpd_unused screen_t *screen, mpdclient_t *c,
+ filelist_entry_t *entry, const char *new_path)
{
mpd_InfoEntity *entity = NULL;
gchar *path = NULL;
}
static int
-load_playlist(screen_t *screen, mpdclient_t *c, filelist_entry_t *entry)
+load_playlist(mpd_unused screen_t *screen, mpdclient_t *c,
+ filelist_entry_t *entry)
{
mpd_InfoEntity *entity = entry->entity;
mpd_PlaylistFile *plf = entity->info.playlistFile;
}
static int
-enqueue_and_play(screen_t *screen, mpdclient_t *c, filelist_entry_t *entry)
+enqueue_and_play(mpd_unused screen_t *screen, mpdclient_t *c,
+ filelist_entry_t *entry)
{
int idx;
mpd_InfoEntity *entity = entry->entity;
int
browse_handle_select_all (screen_t *screen,
mpdclient_t *c,
- list_window_t *local_lw,
+ mpd_unused list_window_t *local_lw,
mpdclient_filelist_t *fl)
{
filelist_entry_t *entry;
}
static void
-browse_open(screen_t *screen, mpdclient_t *c)
+browse_open(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
if( filelist == NULL ) {
filelist = mpdclient_filelist_get(c, "");
}
static void
-browse_paint(screen_t *screen, mpdclient_t *c)
+browse_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
lw->clear = 1;
diff --git a/src/screen_help.c b/src/screen_help.c
index 681bc6cfe5198d81ee65ee39630dfef28b3a54eb..d225b3d6d396b08b6afab88ea450191c127a7b22 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
#include "command.h"
#include "screen.h"
#include "screen_utils.h"
+#include "gcc.h"
#include <stdlib.h>
#include <string.h>
static const char *
-list_callback(unsigned idx, int *highlight, void *data)
+list_callback(unsigned idx, int *highlight, mpd_unused void *data)
{
static char buf[512];
static const char *
-help_title(char *str, size_t size)
+help_title(mpd_unused char *str, mpd_unused size_t size)
{
return _("Help");
}
static void
-help_paint(screen_t *screen, mpdclient_t *c)
+help_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
lw->clear = 1;
list_window_paint(lw, list_callback, NULL);
}
static void
-help_update(screen_t *screen, mpdclient_t *c)
+help_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
if (lw->repaint) {
list_window_paint(lw, list_callback, NULL);
static int
-help_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
+help_cmd(screen_t *screen, mpd_unused mpdclient_t *c, command_t cmd)
{
lw->repaint=1;
lw->clear=1;
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index 54a234961b83ef9a683ea9e3f43b861d983ba099..44c84ca42f0f8747f66e889acc92868c68e1fe9c 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
#include "command.h"
#include "screen.h"
#include "screen_utils.h"
+#include "gcc.h"
#include <errno.h>
#include <stdlib.h>
}
static const char *
-list_callback(unsigned idx, int *highlight, void *data)
+list_callback(unsigned idx, int *highlight, mpd_unused void *data)
{
static char buf[BUFSIZE];
}
static void
-keydef_open(screen_t *screen, mpdclient_t *c)
+keydef_open(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
if( cmds == NULL )
{
}
static void
-keydef_paint(screen_t *screen, mpdclient_t *c)
+keydef_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
lw->clear = 1;
list_window_paint(lw, list_callback, NULL);
}
static void
-keydef_update(screen_t *screen, mpdclient_t *c)
+keydef_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
if( lw->repaint )
{
}
static int
-keydef_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
+keydef_cmd(screen_t *screen, mpd_unused mpdclient_t *c, command_t cmd)
{
int length = LIST_LENGTH();
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index fb45fd49da23c9945387b06f626ea8f29a45f0ff..59329694847d4fb00ef10c67441057e260fc361b 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
#include "easy_download.h"
#include "strfsong.h"
#include "src_lyrics.h"
+#include "gcc.h"
#define _GNU_SOURCE
#include <stdlib.h>
}
static const char *
-list_callback(unsigned idx, int *highlight, void *data)
+list_callback(unsigned idx, int *highlight, mpd_unused void *data)
{
static char buf[512];
static const char *
-lyrics_title(char *str, size_t size)
+lyrics_title(mpd_unused char *str, mpd_unused size_t size)
{
static GString *msg;
if (msg == NULL)
}
static void
-lyrics_paint(screen_t *screen, mpdclient_t *c)
+lyrics_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
lw->clear = 1;
list_window_paint(lw, list_callback, NULL);
static void
-lyrics_update(screen_t *screen, mpdclient_t *c)
+lyrics_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
if( lw->repaint ) {
list_window_paint(lw, list_callback, NULL);
diff --git a/src/screen_play.c b/src/screen_play.c
index 6b68568eefc00cb8f88cf654e4897112415d40c7..2f9e6eba7c57e1ced68c37663f9208d7d89b2e10 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
#include "screen.h"
#include "screen_utils.h"
#include "screen_play.h"
+#include "gcc.h"
#include <ctype.h>
#include <stdlib.h>
}
static int
-center_playing_item(screen_t *screen, mpdclient_t *c)
+center_playing_item(mpdclient_t *c)
{
unsigned length = c->playlist.length;
unsigned offset = lw->selected - lw->start;
}
static void
-save_pre_completion_cb(GCompletion *gcmp, gchar *line, void *data)
+save_pre_completion_cb(GCompletion *gcmp, mpd_unused gchar *line, void *data)
{
completion_callback_data_t *tmp = (completion_callback_data_t *)data;
GList **list = tmp->list;
}
static void
-save_post_completion_cb(GCompletion *gcmp, gchar *line, GList *items,
- void *data)
+save_post_completion_cb(mpd_unused GCompletion *gcmp, mpd_unused gchar *line,
+ GList *items, void *data)
{
completion_callback_data_t *tmp = (completion_callback_data_t *)data;
screen_t *screen = tmp->screen;
}
static void
-play_open(screen_t *screen, mpdclient_t *c)
+play_open(mpd_unused screen_t *screen, mpdclient_t *c)
{
static gboolean install_cb = TRUE;
}
static void
-play_paint(screen_t *screen, mpdclient_t *c)
+play_paint(mpd_unused screen_t *screen, mpdclient_t *c)
{
lw->clear = 1;
static int prev_song_id = 0;
if( c->song && prev_song_id != c->song->id ) {
- center_playing_item(screen, c);
+ center_playing_item(c);
prev_song_id = c->song->id;
}
}
#ifdef HAVE_GETMOUSE
static int
-handle_mouse_event(screen_t *screen, mpdclient_t *c)
+handle_mouse_event(mpd_unused screen_t *screen, mpdclient_t *c)
{
int row;
unsigned selected;
screen->painted = 0;
lw->clear = 1;
lw->repaint = 1;
- center_playing_item(screen, c);
+ center_playing_item(c);
return 1;
case CMD_LIST_MOVE_UP:
mpdclient_cmd_move(c, lw->selected, lw->selected-1);
diff --git a/src/screen_search.c b/src/screen_search.c
index 2161b7914935ec2784b8f8c308b4bb5b609a9fd4..9ec189d0e23ae11fa6b5e340be484378560c7ff3 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
#include "utils.h"
#include "screen_utils.h"
#include "screen_browse.h"
+#include "gcc.h"
#include <ctype.h>
#include <stdlib.h>
/* search info */
static const char *
-lw_search_help_callback(unsigned idx, int *highlight, void *data)
+lw_search_help_callback(unsigned idx, mpd_unused int *highlight,
+ mpd_unused void *data)
{
unsigned text_rows;
static const char *text[] = {
/* the playlist have been updated -> fix highlights */
static void
-playlist_changed_callback(mpdclient_t *c, int event, gpointer data)
+playlist_changed_callback(mpdclient_t *c, int event, mpd_unused gpointer data)
{
if( filelist==NULL )
return;
}
static void
-search_clear(screen_t *screen, mpdclient_t *c, gboolean clear_pattern)
+search_clear(mpd_unused screen_t *screen, mpdclient_t *c,
+ gboolean clear_pattern)
{
if( filelist )
{
#ifdef FUTURE
static mpdclient_filelist_t *
-filelist_search(mpdclient_t *c, int exact_match, int table,
+filelist_search(mpdclient_t *c, mpd_unused int exact_match, int table,
gchar *local_pattern)
{
mpdclient_filelist_t *list, *list2;
}
static void
-open(screen_t *screen, mpdclient_t *c)
+open(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
// if( pattern==NULL )
// search_new(screen, c);
}
static void
-paint(screen_t *screen, mpdclient_t *c)
+paint(mpd_unused screen_t *screen, mpdclient_t *c)
{
lw->clear = 1;