summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ebda16c)
raw | patch | inline | side by side (parent: ebda16c)
author | Max Kellermann <max@duempel.org> | |
Fri, 8 Nov 2013 18:43:01 +0000 (19:43 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 8 Nov 2013 18:43:01 +0000 (19:43 +0100) |
17 files changed:
diff --git a/src/gidle.c b/src/gidle.c
index af7457d85b2850b342b340b02d315e4419f90aca..95ac64621aea80b26070b9470e0415dbe88f01d1 100644 (file)
--- a/src/gidle.c
+++ b/src/gidle.c
*/
#include "gidle.h"
+#include "Compiler.h"
#include <mpd/async.h>
#include <mpd/parser.h>
#include <glib.h>
+
#include <assert.h>
#include <string.h>
#include <errno.h>
}
static gboolean
-mpd_glib_source_callback(G_GNUC_UNUSED GIOChannel *_source,
+mpd_glib_source_callback(gcc_unused GIOChannel *_source,
GIOCondition condition, gpointer data)
{
struct mpd_glib_source *source = data;
diff --git a/src/lirc.c b/src/lirc.c
index 4e67508087ed92066b59d0d31f9a34dbf057b0e8..277d70fd2fad2cc02bcedbf7a67cd8b4510833ab 100644 (file)
--- a/src/lirc.c
+++ b/src/lirc.c
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <lirc/lirc_client.h>
#include "lirc.h"
#include "ncmpc.h"
+#include "Compiler.h"
+
+#include <lirc/lirc_client.h>
static struct lirc_config *lc = NULL;
}
gboolean
-lirc_event(G_GNUC_UNUSED GIOChannel *source,
- G_GNUC_UNUSED GIOCondition condition, G_GNUC_UNUSED gpointer data)
+lirc_event(gcc_unused GIOChannel *source,
+ gcc_unused GIOCondition condition, gcc_unused gpointer data)
{
char *code, *txt;
command_t cmd;
diff --git a/src/main.c b/src/main.c
index d35fda4c0d89228dafa0a160ff5f14e130557dce..d49d40beaac10c8a871c45d4b646ce4231eccf86 100644 (file)
--- a/src/main.c
+++ b/src/main.c
#ifndef WIN32
static void
-catch_sigint(G_GNUC_UNUSED int sig)
+catch_sigint(gcc_unused int sig)
{
g_main_loop_quit(main_loop);
}
static void
-catch_sigcont(G_GNUC_UNUSED int sig)
+catch_sigcont(gcc_unused int sig)
{
char irrelevant = 'a';
if (1 != write(sigwinch_pipes[1], &irrelevant, 1))
}
static gboolean
-sigwinch_event(G_GNUC_UNUSED GIOChannel *source,
- G_GNUC_UNUSED GIOCondition condition, G_GNUC_UNUSED gpointer data)
+sigwinch_event(gcc_unused GIOChannel *source,
+ gcc_unused GIOCondition condition, gcc_unused gpointer data)
{
char ignoreme[64];
if (1 > read(sigwinch_pipes[0], ignoreme, 64))
}
static void
-catch_sigwinch(G_GNUC_UNUSED int sig)
+catch_sigwinch(gcc_unused int sig)
{
char irrelevant = 'a';
if (1 != write(sigwinch_pipes[1], &irrelevant, 1))
static void
idle_callback(enum mpd_error error,
- G_GNUC_UNUSED enum mpd_server_error server_error,
+ gcc_unused enum mpd_server_error server_error,
const char *message, enum mpd_idle events,
- G_GNUC_UNUSED void *ctx);
+ gcc_unused void *ctx);
static gboolean
timer_mpd_update(gpointer data);
* broken. It tries to recover by reconnecting periodically.
*/
static gboolean
-timer_reconnect(G_GNUC_UNUSED gpointer data)
+timer_reconnect(gcc_unused gpointer data)
{
bool success;
struct mpd_connection *connection;
}
static gboolean
-timer_mpd_update(G_GNUC_UNUSED gpointer data)
+timer_mpd_update(gcc_unused gpointer data)
{
do_mpd_update();
}
static gboolean
-keyboard_event(G_GNUC_UNUSED GIOChannel *source,
- G_GNUC_UNUSED GIOCondition condition,
- G_GNUC_UNUSED gpointer data)
+keyboard_event(gcc_unused GIOChannel *source,
+ gcc_unused GIOCondition condition,
+ gcc_unused gpointer data)
{
command_t cmd;
* message every 10 seconds.
*/
static gboolean
-timer_check_key_bindings(G_GNUC_UNUSED gpointer data)
+timer_check_key_bindings(gcc_unused gpointer data)
{
char buf[256];
#ifdef ENABLE_KEYDEF_SCREEN
#endif
#ifdef ENABLE_LOCALE
#ifndef ENABLE_NLS
- G_GNUC_UNUSED
+ gcc_unused
#endif
const char *charset = NULL;
#endif
diff --git a/src/plugin.c b/src/plugin.c
index fcfaea9752e124bb48008daf70d2ee57a2d50504..29e4ffcd1a47a39dca5ec89c7fac6c1a9ac4648a 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
*/
#include "plugin.h"
+#include "Compiler.h"
#include <assert.h>
#include <stdlib.h>
return true;
}
-static gint
+static gint
plugin_compare_func_alpha(gconstpointer plugin1, gconstpointer plugin2)
{
return strcmp(* (char * const *) plugin1, * (char * const *) plugin2);
}
static gboolean
-plugin_data(G_GNUC_UNUSED GIOChannel *source,
- G_GNUC_UNUSED GIOCondition condition, gpointer data)
+plugin_data(gcc_unused GIOChannel *source,
+ gcc_unused GIOCondition condition, gpointer data)
{
struct plugin_cycle *cycle = data;
struct plugin_pipe *p = NULL;
diff --git a/src/screen_artist.c b/src/screen_artist.c
index d488a7b9cb5a0090c280fefbfb34a749c3f9b304..5ff6f9b81c8d258128fab32783c5da9b1de7b95a 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
*/
static void
paint_artist_callback(WINDOW *w, unsigned i,
- G_GNUC_UNUSED unsigned y, unsigned width,
+ gcc_unused unsigned y, unsigned width,
bool selected, void *data)
{
GPtrArray *list = data;
*/
static void
paint_album_callback(WINDOW *w, unsigned i,
- G_GNUC_UNUSED unsigned y, unsigned width,
+ gcc_unused unsigned y, unsigned width,
bool selected, void *data)
{
GPtrArray *list = data;
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 936bd1f26ac5d360c69d0c55ceab80b598c5f318..6c802f6e87aaa2a0654a0ce7b42c2d88d4598cdb 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
static bool
browser_select_entry(struct mpdclient *c, struct filelist_entry *entry,
- G_GNUC_UNUSED gboolean toggle)
+ gcc_unused gboolean toggle)
{
assert(entry != NULL);
assert(entry->entity != NULL);
diff --git a/src/screen_browser.h b/src/screen_browser.h
index b30a1da53beb7632def15dc293e1407acab75e6a..ad840dd1bad7cfbf74593ed485523f177a1bde9a 100644 (file)
--- a/src/screen_browser.h
+++ b/src/screen_browser.h
#include <glib.h>
static inline void
-screen_browser_sync_highlights(G_GNUC_UNUSED struct filelist *fl,
- G_GNUC_UNUSED const struct mpdclient_playlist *playlist)
+screen_browser_sync_highlights(gcc_unused struct filelist *fl,
+ gcc_unused const struct mpdclient_playlist *playlist)
{
}
diff --git a/src/screen_chat.c b/src/screen_chat.c
index 2b887bafbe3a6208cd2758e4521bd60fbe93eb89..f30da93bb980b292c61ca9391eec9f93340efbb8 100644 (file)
--- a/src/screen_chat.c
+++ b/src/screen_chat.c
}
static const char *
-screen_chat_title(G_GNUC_UNUSED char *s, G_GNUC_UNUSED size_t size)
+screen_chat_title(gcc_unused char *s, gcc_unused size_t size)
{
return _("Chat");
}
diff --git a/src/screen_help.c b/src/screen_help.c
index 5441b7bd712529ed7ea5fadebfa483d96753fd5e..da2d3e9773465ecc820429a5056cac5fc73b9951 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
static struct list_window *lw;
static const char *
-list_callback(unsigned i, G_GNUC_UNUSED void *data)
+list_callback(unsigned i, gcc_unused void *data)
{
const struct help_text_row *row = &help_text[i];
static const char *
-help_title(G_GNUC_UNUSED char *str, G_GNUC_UNUSED size_t size)
+help_title(gcc_unused char *str, gcc_unused size_t size)
{
return _("Help");
}
static void
screen_help_paint_callback(WINDOW *w, unsigned i,
unsigned y, unsigned width,
- G_GNUC_UNUSED bool selected,
- G_GNUC_UNUSED void *data)
+ gcc_unused bool selected,
+ gcc_unused void *data)
{
const struct help_text_row *row = &help_text[i];
}
static bool
-help_cmd(G_GNUC_UNUSED struct mpdclient *c, command_t cmd)
+help_cmd(gcc_unused struct mpdclient *c, command_t cmd)
{
if (list_window_scroll_cmd(lw, cmd)) {
help_paint();
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index 32791b8c0e364a2eb32eab2006e2c7d098c8442f..ad78c383d48b235ec6a12bc9f1ab8659c8821819 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
#include "conf.h"
#include "screen.h"
#include "screen_utils.h"
+#include "Compiler.h"
#include <assert.h>
#include <errno.h>
* the position of the "apply" item. It's the same as command_n_commands,
* because array subscripts start at 0, while numbers of items start at 1.
*/
-static G_GNUC_PURE inline unsigned
+gcc_pure
+static inline unsigned
command_item_apply(void)
{
return command_n_commands;
}
/** the position of the "apply and save" item */
-static G_GNUC_PURE inline unsigned
+gcc_pure
+static inline unsigned
command_item_save(void)
{
return command_item_apply() + 1;
}
/** the number of items in the "command" view */
-static G_GNUC_PURE inline unsigned
+gcc_pure
+static inline unsigned
command_length(void)
{
return command_item_save() + 1;
static unsigned subcmd_n_keys = 0;
/** The position of the up ("[..]") item */
-static G_GNUC_CONST inline unsigned
+gcc_const
+static inline unsigned
subcmd_item_up(void)
{
return 0;
}
/** The position of the "add a key" item */
-static G_GNUC_PURE inline unsigned
+gcc_pure
+static inline unsigned
subcmd_item_add(void)
{
return subcmd_n_keys + 1;
}
/** The number of items in the list_window, if there's a command being edited */
-static G_GNUC_PURE inline unsigned
+gcc_pure
+static inline unsigned
subcmd_length(void)
{
return subcmd_item_add() + 1;
}
/** Check whether a given item is a key */
-static G_GNUC_PURE inline bool
+gcc_pure
+static inline bool
subcmd_item_is_key(unsigned i)
{
return (i > subcmd_item_up() && i < subcmd_item_add());
* Convert an item id (as in lw->selected) into a "key id", which is an array
* subscript to cmds[subcmd].keys.
*/
-static G_GNUC_CONST inline unsigned
+gcc_const
+static inline unsigned
subcmd_item_to_key_id(unsigned i)
{
return i - 1;
}
static const char *
-list_callback(unsigned idx, G_GNUC_UNUSED void *data)
+list_callback(unsigned idx, gcc_unused void *data)
{
static char buf[256];
}
static void
-keydef_open(G_GNUC_UNUSED struct mpdclient *c)
+keydef_open(gcc_unused struct mpdclient *c)
{
if (cmds == NULL) {
command_definition_t *current_cmds = get_command_definitions();
}
static bool
-keydef_cmd(G_GNUC_UNUSED struct mpdclient *c, command_t cmd)
+keydef_cmd(gcc_unused struct mpdclient *c, command_t cmd)
{
if (cmd == CMD_LIST_RANGE_SELECT)
return false;
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 066fe6edc2ab69baaaf04031dae5f4f574f7596e..cda976e0a05d058c55b16b0b0a3f5d9cf626a132 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
static void
screen_lyrics_callback(const GString *result, const bool success,
- const char *plugin_name, G_GNUC_UNUSED void *data)
+ const char *plugin_name, gcc_unused void *data)
{
assert(current.loader != NULL);
}
static gboolean
-screen_lyrics_timeout_callback(gpointer G_GNUC_UNUSED data)
+screen_lyrics_timeout_callback(gpointer gcc_unused data)
{
plugin_stop(current.loader);
current.loader = NULL;
diff --git a/src/screen_outputs.c b/src/screen_outputs.c
index 888aa34f1f9edcbb970564e173f746443e5809db..5ec897dade076dfa2acbc01e6655fc797f2d7b25 100644 (file)
--- a/src/screen_outputs.c
+++ b/src/screen_outputs.c
}
static void
-clear_output_element(gpointer data, G_GNUC_UNUSED gpointer user_data)
+clear_output_element(gpointer data, gcc_unused gpointer user_data)
{
mpd_output_free(data);
}
}
static const char *
-outputs_title(G_GNUC_UNUSED char *str, G_GNUC_UNUSED size_t size)
+outputs_title(gcc_unused char *str, gcc_unused size_t size)
{
return _("Outputs");
}
static void
screen_outputs_paint_callback(WINDOW *w, unsigned i,
- G_GNUC_UNUSED unsigned y, unsigned width,
- bool selected, G_GNUC_UNUSED void *data)
+ gcc_unused unsigned y, unsigned width,
+ bool selected, gcc_unused void *data)
{
const struct mpd_output *output;
diff --git a/src/screen_queue.c b/src/screen_queue.c
index 71f19a5c9c0e0ee948c5832df2addbc116de69ca..87cdc63ad0a517c86c144d1652bafc75bb610af8 100644 (file)
--- a/src/screen_queue.c
+++ b/src/screen_queue.c
#include "screen_utils.h"
#include "screen_song.h"
#include "screen_lyrics.h"
+#include "Compiler.h"
#ifndef NCMPC_MINI
#include "hscroll.h"
}
static const char *
-screen_queue_lw_callback(unsigned idx, G_GNUC_UNUSED void *data)
+screen_queue_lw_callback(unsigned idx, gcc_unused void *data)
{
static char songname[MAX_SONG_LENGTH];
struct mpd_song *song;
list_window_fetch_cursor(lw);
}
-G_GNUC_PURE
+gcc_pure
static int
get_current_song_id(const struct mpd_status *status)
{
#ifndef NCMPC_MINI
static void
-save_pre_completion_cb(GCompletion *gcmp, G_GNUC_UNUSED gchar *line,
+save_pre_completion_cb(GCompletion *gcmp, gcc_unused gchar *line,
void *data)
{
completion_callback_data_t *tmp = (completion_callback_data_t *)data;
}
static void
-save_post_completion_cb(G_GNUC_UNUSED GCompletion *gcmp,
- G_GNUC_UNUSED gchar *line, GList *items,
- G_GNUC_UNUSED void *data)
+save_post_completion_cb(gcc_unused GCompletion *gcmp,
+ gcc_unused gchar *line, GList *items,
+ gcc_unused void *data)
{
if (g_list_length(items) >= 1)
screen_display_completion_list(items);
static void
screen_queue_paint_callback(WINDOW *w, unsigned i,
unsigned y, unsigned width,
- bool selected, G_GNUC_UNUSED void *data)
+ bool selected, gcc_unused void *data)
{
const struct mpd_song *song;
struct hscroll *row_hscroll;
diff --git a/src/screen_search.c b/src/screen_search.c
index 3abda9d9c574e116c5e417043f100f866250a1ef..42253d0ad8c2d4c423a5c75c453929569119b9bc 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
/* search info */
static const char *
-lw_search_help_callback(unsigned idx, G_GNUC_UNUSED void *data)
+lw_search_help_callback(unsigned idx, gcc_unused void *data)
{
assert(idx < G_N_ELEMENTS(help_text));
}
static void
-screen_search_open(G_GNUC_UNUSED struct mpdclient *c)
+screen_search_open(gcc_unused struct mpdclient *c)
{
// if( pattern==NULL )
// search_new(screen, c);
diff --git a/src/screen_song.c b/src/screen_song.c
index 156486aa36128828313528e7e29415ad11d1dbf8..c2b6c3c5f67be21c1a397d996c83f74d70c8271a 100644 (file)
--- a/src/screen_song.c
+++ b/src/screen_song.c
}
static const char *
-screen_song_list_callback(unsigned idx, G_GNUC_UNUSED void *data)
+screen_song_list_callback(unsigned idx, gcc_unused void *data)
{
assert(idx < current.lines->len);
}
static const char *
-screen_song_title(G_GNUC_UNUSED char *str, G_GNUC_UNUSED size_t size)
+screen_song_title(gcc_unused char *str, gcc_unused size_t size)
{
return _("Song viewer");
}
diff --git a/src/screen_text.c b/src/screen_text.c
index 03a8fc57866bbba006b9d3ce7f6a2e39ea42371b..44fe492e9ca0a6c16fbad7ab662ed81333f1a629 100644 (file)
--- a/src/screen_text.c
+++ b/src/screen_text.c
bool
screen_text_cmd(struct screen_text *text,
- G_GNUC_UNUSED struct mpdclient *c, command_t cmd)
+ gcc_unused struct mpdclient *c, command_t cmd)
{
if (list_window_scroll_cmd(text->lw, cmd)) {
screen_text_repaint(text);
diff --git a/src/song_paint.c b/src/song_paint.c
index b0c452b8472d5b58c5c66f3206b1d9fb4aa18410..f3f3918c02a7909e1f584ae5a40e77a6599486aa 100644 (file)
--- a/src/song_paint.c
+++ b/src/song_paint.c
#include <string.h>
void
-paint_song_row(WINDOW *w, G_GNUC_UNUSED unsigned y, unsigned width,
+paint_song_row(WINDOW *w, gcc_unused unsigned y, unsigned width,
bool selected, bool highlight, const struct mpd_song *song,
- G_GNUC_UNUSED struct hscroll *hscroll)
+ gcc_unused struct hscroll *hscroll)
{
char buffer[width * 4];