# HG changeset patch
# Node ID c6d6d070fb96
# Parent  df47db24cee6
diff --git a/libpurple/protocols/irc/cmds.c b/libpurple/protocols/irc/cmds.c
--- a/libpurple/protocols/irc/cmds.c
+++ b/libpurple/protocols/irc/cmds.c
@@ -27,7 +27,9 @@
 
 static void irc_do_mode(struct irc_conn *irc, const char *target, const char *sign, char **ops);
 
-int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target,
+                G_GNUC_UNUSED const char **args)
 {
 	PurpleConversation *convo;
 	PurpleConversationManager *manager;
@@ -47,7 +49,9 @@
 	return 1;
 }
 
-int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_away(struct irc_conn *irc, const char *cmd,
+             G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf, *message;
 
@@ -65,7 +69,9 @@
 	return 0;
 }
 
-int irc_cmd_ctcp(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_ctcp(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             G_GNUC_UNUSED const char *target, const char **args)
 {
 	/* we have defined args as args[0] is target and args[1] is ctcp command */
 	char *buf;
@@ -222,7 +228,9 @@
 	return 1;
 }
 
-int irc_cmd_ctcp_version(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_ctcp_version(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+                     G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf;
 
@@ -236,7 +244,9 @@
 	return 0;
 }
 
-int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_invite(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+               const char *target, const char **args)
 {
 	char *buf;
 
@@ -250,7 +260,9 @@
 	return 0;
 }
 
-int irc_cmd_join(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_join(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf;
 
@@ -267,7 +279,9 @@
 	return 0;
 }
 
-int irc_cmd_kick(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_kick(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             const char *target, const char **args)
 {
 	PurpleConversationManager *manager;
 	char *buf;
@@ -292,7 +306,9 @@
 	return 0;
 }
 
-int irc_cmd_list(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_list(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             G_GNUC_UNUSED const char *target, G_GNUC_UNUSED const char **args)
 {
 	purple_roomlist_show_with_account(irc->account);
 
@@ -331,7 +347,9 @@
 	return 0;
 }
 
-int irc_cmd_names(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_names(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+              const char *target, const char **args)
 {
 	char *buf;
 
@@ -345,7 +363,9 @@
 	return 0;
 }
 
-int irc_cmd_nick(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_nick(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf;
 
@@ -407,7 +427,9 @@
 	return 0;
 }
 
-int irc_cmd_part(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_part(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             const char *target, const char **args)
 {
 	char *buf;
 
@@ -424,7 +446,9 @@
 	return 0;
 }
 
-int irc_cmd_ping(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_ping(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             const char *target, const char **args)
 {
 	char *stamp;
 	char *buf;
@@ -452,7 +476,9 @@
 	return 0;
 }
 
-int irc_cmd_privmsg(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_privmsg(struct irc_conn *irc, const char *cmd,
+                G_GNUC_UNUSED const char *target, const char **args)
 {
 	int max_privmsg_arg_len;
 	const char *cur, *end;
@@ -498,7 +524,9 @@
 	return 0;
 }
 
-int irc_cmd_quit(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_quit(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf;
 
@@ -521,7 +549,9 @@
 	return 0;
 }
 
-int irc_cmd_quote(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_quote(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+              G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf;
 
@@ -568,7 +598,9 @@
 	return 0;
 }
 
-int irc_cmd_remove(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_remove(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+               const char *target, const char **args)
 {
 	char *buf;
 
@@ -588,7 +620,9 @@
 	return 0;
 }
 
-int irc_cmd_service(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_service(struct irc_conn *irc, const char *cmd,
+                G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *capital_cmd, *buf;
 
@@ -605,7 +639,9 @@
 	return 0;
 }
 
-int irc_cmd_time(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_time(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+             G_GNUC_UNUSED const char *target, G_GNUC_UNUSED const char **args)
 {
 	char *buf;
 
@@ -616,7 +652,9 @@
 	return 0;
 }
 
-int irc_cmd_topic(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_topic(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+              const char *target, const char **args)
 {
 	PurpleConversation *chat;
 	PurpleConversationManager *manager;
@@ -659,7 +697,9 @@
 	return 0;
 }
 
-int irc_cmd_wallops(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_wallops(struct irc_conn *irc, const char *cmd,
+                G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf;
 
@@ -679,7 +719,9 @@
 	return 0;
 }
 
-int irc_cmd_whois(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_whois(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+              G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf;
 
@@ -700,7 +742,9 @@
 	return 0;
 }
 
-int irc_cmd_whowas(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
+int
+irc_cmd_whowas(struct irc_conn *irc, G_GNUC_UNUSED const char *cmd,
+               G_GNUC_UNUSED const char *target, const char **args)
 {
 	char *buf;
 
diff --git a/libpurple/protocols/irc/dcc_send.c b/libpurple/protocols/irc/dcc_send.c
--- a/libpurple/protocols/irc/dcc_send.c
+++ b/libpurple/protocols/irc/dcc_send.c
@@ -58,7 +58,10 @@
  * It sends the acknowledgement (in the form of a total byte count as an
  * unsigned 4 byte integer in network byte order)
  */
-static void irc_dccsend_recv_ack(PurpleXfer *xfer, const guchar *data, size_t size) {
+static void
+irc_dccsend_recv_ack(PurpleXfer *xfer, G_GNUC_UNUSED const guchar *data,
+                     G_GNUC_UNUSED size_t size)
+{
 	guint32 l;
 	gssize result;
 
@@ -155,7 +158,9 @@
  *******************************************************************/
 
 /* just in case you were wondering, this is why DCC is crappy */
-static void irc_dccsend_send_read(gpointer data, int source, PurpleInputCondition cond)
+static void
+irc_dccsend_send_read(gpointer data, int source,
+                      G_GNUC_UNUSED PurpleInputCondition cond)
 {
 	PurpleXfer *xfer = PURPLE_XFER(data);
 	IrcXfer *xd = IRC_XFER(xfer);
@@ -227,7 +232,7 @@
 }
 
 static void
-irc_dccsend_send_connected(GSocketService *service,
+irc_dccsend_send_connected(G_GNUC_UNUSED GSocketService *service,
                            GSocketConnection *connection,
                            GObject *source_object, G_GNUC_UNUSED gpointer data)
 {
@@ -320,7 +325,10 @@
 	g_free(tmp);
 }
 
-PurpleXfer *irc_dccsend_new_xfer(PurpleProtocolXfer *prplxfer, PurpleConnection *gc, const char *who) {
+PurpleXfer *
+irc_dccsend_new_xfer(G_GNUC_UNUSED PurpleProtocolXfer *prplxfer,
+                     PurpleConnection *gc, const char *who)
+{
 	return g_object_new(
 		IRC_TYPE_XFER,
 		"account", purple_connection_get_account(gc),
@@ -363,8 +371,7 @@
  * GObject Implementation
  *****************************************************************************/
 static void
-irc_xfer_init(IrcXfer *xfer)
-{
+irc_xfer_init(G_GNUC_UNUSED IrcXfer *xfer) {
 }
 
 static void
@@ -389,8 +396,7 @@
 }
 
 static void
-irc_xfer_class_finalize(IrcXferClass *klass) {
-
+irc_xfer_class_finalize(G_GNUC_UNUSED IrcXferClass *klass) {
 }
 
 static void
diff --git a/libpurple/protocols/irc/irc.c b/libpurple/protocols/irc/irc.c
--- a/libpurple/protocols/irc/irc.c
+++ b/libpurple/protocols/irc/irc.c
@@ -240,8 +240,8 @@
 }
 
 static int
-irc_send_raw(PurpleProtocolServer *protocol_server, PurpleConnection *gc,
-             const gchar *buf, gint len)
+irc_send_raw(G_GNUC_UNUSED PurpleProtocolServer *protocol_server,
+             PurpleConnection *gc, const gchar *buf, gint len)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	if (len == -1) {
@@ -276,8 +276,8 @@
     return irc_send_len(irc, buf, strlen(buf));
 }
 
-int irc_send_len(struct irc_conn *irc, const char *buf, int buflen)
-{
+int
+irc_send_len(struct irc_conn *irc, const char *buf, G_GNUC_UNUSED int buflen) {
  	char *tosend = g_strdup(buf);
 	int len;
 	GBytes *data;
@@ -348,7 +348,9 @@
 	g_string_free(string, TRUE);
 }
 
-static void irc_ison_buddy_init(char *name, struct irc_buddy *ib, GList **list)
+static void
+irc_ison_buddy_init(G_GNUC_UNUSED char *name, struct irc_buddy *ib,
+                    GList **list)
 {
 	*list = g_list_append(*list, ib);
 }
@@ -370,7 +372,7 @@
 }
 
 static GList *
-irc_protocol_get_account_options(PurpleProtocol *protocol) {
+irc_protocol_get_account_options(G_GNUC_UNUSED PurpleProtocol *protocol) {
 	PurpleAccountOption *option;
 	GList *opts = NULL;
 
@@ -415,7 +417,7 @@
 }
 
 static GList *
-irc_protocol_get_user_splits(PurpleProtocol *protocol) {
+irc_protocol_get_user_splits(G_GNUC_UNUSED PurpleProtocol *protocol) {
 	PurpleAccountUserSplit *split;
 
 	split = purple_account_user_split_new(_("Server"), IRC_DEFAULT_SERVER,
@@ -426,7 +428,7 @@
 
 static GList *
 irc_status_types(G_GNUC_UNUSED PurpleProtocol *protocol,
-                 PurpleAccount *account)
+                 G_GNUC_UNUSED PurpleAccount *account)
 {
 	PurpleStatusType *type;
 	GList *types = NULL;
@@ -447,13 +449,13 @@
 }
 
 static const gchar *
-irc_protocol_actions_get_prefix(PurpleProtocolActions *actions) {
+irc_protocol_actions_get_prefix(G_GNUC_UNUSED PurpleProtocolActions *actions) {
 	return "prpl-irc";
 }
 
 static GActionGroup *
-irc_protocol_actions_get_action_group(PurpleProtocolActions *actions,
-                                      PurpleConnection *connection)
+irc_protocol_actions_get_action_group(G_GNUC_UNUSED PurpleProtocolActions *actions,
+                                      G_GNUC_UNUSED PurpleConnection *connection)
 {
 	GSimpleActionGroup *group = NULL;
 	GActionEntry entries[] = {
@@ -493,7 +495,9 @@
 }
 
 static GList *
-irc_chat_join_info(PurpleProtocolChat *protocol_chat, PurpleConnection *gc) {
+irc_chat_join_info(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+                   G_GNUC_UNUSED PurpleConnection *gc)
+{
 	GList *m = NULL;
 	PurpleProtocolChatEntry *pce;
 
@@ -513,7 +517,8 @@
 }
 
 static GHashTable *
-irc_chat_info_defaults(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
+irc_chat_info_defaults(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+                       G_GNUC_UNUSED PurpleConnection *gc,
                        const gchar *chat_name)
 {
 	GHashTable *defaults;
@@ -727,7 +732,9 @@
 	g_free(irc);
 }
 
-static int irc_im_send(PurpleProtocolIM *im, PurpleConnection *gc, PurpleMessage *msg)
+static int
+irc_im_send(G_GNUC_UNUSED PurpleProtocolIM *im, PurpleConnection *gc,
+            PurpleMessage *msg)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	char *plain;
@@ -745,8 +752,8 @@
 }
 
 static void
-irc_get_info(PurpleProtocolServer *protocol_server, PurpleConnection *gc,
-             const gchar *who)
+irc_get_info(G_GNUC_UNUSED PurpleProtocolServer *protocol_server,
+             PurpleConnection *gc, const gchar *who)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	const char *args[2];
@@ -756,8 +763,8 @@
 }
 
 static void
-irc_set_status(PurpleProtocolServer *protocol_server, PurpleAccount *account,
-               PurpleStatus *status)
+irc_set_status(G_GNUC_UNUSED PurpleProtocolServer *protocol_server,
+               PurpleAccount *account, PurpleStatus *status)
 {
 	PurpleConnection *gc = purple_account_get_connection(account);
 	struct irc_conn *irc;
@@ -783,8 +790,10 @@
 }
 
 static void
-irc_add_buddy(PurpleProtocolServer *protocol_server, PurpleConnection *gc,
-              PurpleBuddy *buddy, PurpleGroup *group, const gchar *message)
+irc_add_buddy(G_GNUC_UNUSED PurpleProtocolServer *protocol_server,
+              PurpleConnection *gc, PurpleBuddy *buddy,
+              G_GNUC_UNUSED PurpleGroup *group,
+              G_GNUC_UNUSED const gchar *message)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	struct irc_buddy *ib;
@@ -810,8 +819,9 @@
 }
 
 static void
-irc_remove_buddy(PurpleProtocolServer *protocol_server, PurpleConnection *gc,
-                 PurpleBuddy *buddy, PurpleGroup *group)
+irc_remove_buddy(G_GNUC_UNUSED PurpleProtocolServer *protocol_server,
+                 PurpleConnection *gc, PurpleBuddy *buddy,
+                 G_GNUC_UNUSED PurpleGroup *group)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	struct irc_buddy *ib;
@@ -872,8 +882,8 @@
 }
 
 static void
-irc_chat_join(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
-              GHashTable *data)
+irc_chat_join(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+              PurpleConnection *gc, GHashTable *data)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	const char *args[2];
@@ -884,13 +894,16 @@
 }
 
 static gchar *
-irc_get_chat_name(PurpleProtocolChat *protocol_chat, GHashTable *data) {
+irc_get_chat_name(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+                  GHashTable *data)
+{
 	return g_strdup(g_hash_table_lookup(data, "channel"));
 }
 
 static void
-irc_chat_invite(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
-                gint id, const gchar *message, const gchar *name)
+irc_chat_invite(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+                PurpleConnection *gc, gint id,
+                G_GNUC_UNUSED const gchar *message, const gchar *name)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	PurpleConversation *convo;
@@ -912,8 +925,8 @@
 
 
 static void
-irc_chat_leave(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
-               gint id)
+irc_chat_leave(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+               PurpleConnection *gc, gint id)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	PurpleConversation *convo;
@@ -935,8 +948,8 @@
 }
 
 static gint
-irc_chat_send(PurpleProtocolChat *protocol_chat, PurpleConnection *gc, gint id,
-              PurpleMessage *msg)
+irc_chat_send(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+              PurpleConnection *gc, gint id, PurpleMessage *msg)
 {
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	PurpleConversation *convo;
@@ -991,8 +1004,8 @@
 }
 
 static void
-irc_chat_set_topic(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
-                   gint id, const gchar *topic)
+irc_chat_set_topic(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+                   PurpleConnection *gc, gint id, const gchar *topic)
 {
 	PurpleConversation *conv;
 	PurpleConversationManager *manager;
@@ -1018,7 +1031,7 @@
 }
 
 static PurpleRoomlist *
-irc_roomlist_get_list(PurpleProtocolRoomlist *protocol_roomlist,
+irc_roomlist_get_list(G_GNUC_UNUSED PurpleProtocolRoomlist *protocol_roomlist,
                       PurpleConnection *gc)
 {
 	struct irc_conn *irc;
@@ -1039,7 +1052,7 @@
 }
 
 static void
-irc_roomlist_cancel(PurpleProtocolRoomlist *protocol_roomlist,
+irc_roomlist_cancel(G_GNUC_UNUSED PurpleProtocolRoomlist *protocol_roomlist,
                     PurpleRoomlist *list)
 {
 	PurpleAccount *account = purple_roomlist_get_account(list);
@@ -1060,22 +1073,25 @@
 }
 
 static void
-irc_keepalive(PurpleProtocolServer *protocol_server, PurpleConnection *gc) {
+irc_keepalive(G_GNUC_UNUSED PurpleProtocolServer *protocol_server,
+              PurpleConnection *gc)
+{
 	struct irc_conn *irc = purple_connection_get_protocol_data(gc);
 	if ((time(NULL) - irc->recv_time) > PING_TIMEOUT)
 		irc_cmd_ping(irc, NULL, NULL, NULL);
 }
 
 static const char *
-irc_normalize(PurpleProtocolClient *client, PurpleAccount *account,
+irc_normalize(G_GNUC_UNUSED PurpleProtocolClient *client,
+              G_GNUC_UNUSED PurpleAccount *account,
               const char *who)
 {
 	return purple_normalize_nocase(who);
 }
 
 static gssize
-irc_get_max_message_size(PurpleProtocolClient *client,
-                         PurpleConversation *conv)
+irc_get_max_message_size(G_GNUC_UNUSED PurpleProtocolClient *client,
+                         G_GNUC_UNUSED PurpleConversation *conv)
 {
 	/* TODO: this static value is got from pidgin-otr, but it depends on
 	 * some factors, for example IRC channel name. */
@@ -1083,8 +1099,7 @@
 }
 
 static void
-irc_protocol_init(IRCProtocol *self)
-{
+irc_protocol_init(G_GNUC_UNUSED IRCProtocol *self) {
 }
 
 static void
@@ -1200,8 +1215,7 @@
 }
 
 static GPluginPluginInfo *
-irc_query(GError **error)
-{
+irc_query(G_GNUC_UNUSED GError **error) {
 	return purple_plugin_info_new(
 		"id",           "prpl-irc",
 		"name",         "IRC Protocol",
@@ -1254,7 +1268,8 @@
 }
 
 static gboolean
-irc_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error)
+irc_unload(GPluginPlugin *plugin, G_GNUC_UNUSED gboolean shutdown,
+           GError **error)
 {
 	PurpleProtocolManager *manager = purple_protocol_manager_get_default();
 
diff --git a/libpurple/protocols/irc/msgs.c b/libpurple/protocols/irc/msgs.c
--- a/libpurple/protocols/irc/msgs.c
+++ b/libpurple/protocols/irc/msgs.c
@@ -120,7 +120,9 @@
 }
 
 /* This function is ugly, but it's really an error handler. */
-void irc_msg_default(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_default(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                G_GNUC_UNUSED const char *from, char **args)
 {
 	int i;
 	const char *end, *cur, *numeric = NULL;
@@ -196,7 +198,9 @@
 	g_free(clean);
 }
 
-void irc_msg_features(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_features(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                 G_GNUC_UNUSED const char *from, char **args)
 {
 	gchar **features;
 	int i;
@@ -213,7 +217,9 @@
 	g_strfreev(features);
 }
 
-void irc_msg_luser(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_luser(struct irc_conn *irc, const char *name,
+              G_GNUC_UNUSED const char *from, char **args)
 {
 	if (purple_strequal(name, "251")) {
 		/* 251 is required, so we pluck our nick from here and
@@ -244,7 +250,9 @@
 	}
 }
 
-void irc_msg_badmode(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_badmode(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 
@@ -254,7 +262,9 @@
 		purple_request_cpar_from_connection(gc));
 }
 
-void irc_msg_ban(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_ban(struct irc_conn *irc, const char *name,
+            G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConversation *chat;
 	PurpleConversationManager *manager;
@@ -293,7 +303,9 @@
 	}
 }
 
-void irc_msg_banned(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_banned(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+               G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	char *buf;
@@ -306,7 +318,9 @@
 	g_free(buf);
 }
 
-void irc_msg_banfull(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_banfull(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConversation *chat;
 	PurpleConversationManager *manager;
@@ -326,7 +340,9 @@
 	g_free(buf);
 }
 
-void irc_msg_chanmode(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_chanmode(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                 G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConversation *chat;
 	PurpleConversationManager *manager;
@@ -346,7 +362,9 @@
 	g_free(buf);
 }
 
-void irc_msg_whois(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_whois(struct irc_conn *irc, const char *name,
+              G_GNUC_UNUSED const char *from, char **args)
 {
 	if (!irc->whois.nick) {
 		purple_debug_warning("irc", "Unexpected %s reply for %s",
@@ -391,7 +409,9 @@
 	}
 }
 
-void irc_msg_endwhois(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_endwhois(struct irc_conn *irc, const char *name,
+                 G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc;
 	char *tmp, *tmp2;
@@ -478,7 +498,9 @@
 	memset(&irc->whois, 0, sizeof(irc->whois));
 }
 
-void irc_msg_who(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_who(struct irc_conn *irc, const char *name,
+            G_GNUC_UNUSED const char *from, char **args)
 {
 	if (purple_strequal(name, "352")) {
 		PurpleConversation *chat;
@@ -532,7 +554,9 @@
 	}
 }
 
-void irc_msg_list(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_list(struct irc_conn *irc, const char *name,
+             G_GNUC_UNUSED const char *from, char **args)
 {
 	if (!irc->roomlist)
 		return;
@@ -625,7 +649,9 @@
 	g_free(topic);
 }
 
-void irc_msg_topicinfo(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_topicinfo(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                  G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConversation *chat;
 	PurpleConversationManager *manager;
@@ -667,7 +693,9 @@
 	g_date_time_unref(local);
 }
 
-void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_unknown(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	char *buf;
@@ -681,7 +709,9 @@
 	g_free(buf);
 }
 
-void irc_msg_names(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_names(struct irc_conn *irc, const char *name,
+              G_GNUC_UNUSED const char *from, char **args)
 {
 	char *names, *cur, *end, *tmp, *msg;
 
@@ -758,7 +788,9 @@
 	}
 }
 
-void irc_msg_motd(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_motd(struct irc_conn *irc, const char *name,
+             G_GNUC_UNUSED const char *from, char **args)
 {
 	char *escaped;
 
@@ -800,7 +832,9 @@
 	g_free(escaped);
 }
 
-void irc_msg_time(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_time(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc;
 
@@ -813,7 +847,9 @@
 		purple_request_cpar_from_connection(gc));
 }
 
-void irc_msg_nochan(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_nochan(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+               G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 
@@ -823,7 +859,9 @@
 		purple_request_cpar_from_connection(gc));
 }
 
-void irc_msg_nonick(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_nonick(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+               G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc;
 	PurpleConversation *convo;
@@ -849,7 +887,9 @@
 	}
 }
 
-void irc_msg_nosend(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_nosend(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+               G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc;
 	PurpleConversation *chat;
@@ -869,7 +909,9 @@
 	}
 }
 
-void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_notinchan(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                  G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConversation *chat;
 	PurpleConversationManager *manager;
@@ -887,7 +929,9 @@
 	}
 }
 
-void irc_msg_notop(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_notop(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+              G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConversation *chat;
 	PurpleConversationManager *manager;
@@ -902,7 +946,9 @@
 	purple_conversation_write_system_message(chat, args[2], 0);
 }
 
-void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_invite(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+               const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	GHashTable *components;
@@ -919,7 +965,9 @@
 	g_free(nick);
 }
 
-void irc_msg_inviteonly(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_inviteonly(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                   G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	char *buf;
@@ -932,7 +980,9 @@
 	g_free(buf);
 }
 
-void irc_msg_ison(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_ison(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             G_GNUC_UNUSED const char *from, char **args)
 {
 	char **nicks;
 	struct irc_buddy *ib;
@@ -971,7 +1021,9 @@
 	}
 }
 
-void irc_msg_join(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_join(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	PurpleConversation *chat;
@@ -1040,7 +1092,9 @@
 	g_free(nick);
 }
 
-void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_kick(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	PurpleConversation *chat;
@@ -1075,7 +1129,9 @@
 	g_free(nick);
 }
 
-void irc_msg_mode(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_mode(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             const char *from, char **args)
 {
 	char *nick = irc_mask_nick(from), *buf;
 
@@ -1146,7 +1202,9 @@
 	g_free(nick);
 }
 
-void irc_msg_nick(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_nick(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	PurpleConversation *im;
@@ -1183,7 +1241,9 @@
 	g_free(nick);
 }
 
-void irc_msg_badnick(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_badnick(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                G_GNUC_UNUSED const char *from, G_GNUC_UNUSED char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	if (purple_connection_get_state(gc) == PURPLE_CONNECTION_STATE_CONNECTED) {
@@ -1200,7 +1260,9 @@
 	}
 }
 
-void irc_msg_nickused(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_nickused(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                 G_GNUC_UNUSED const char *from, char **args)
 {
 	char *newnick, *buf, *end;
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
@@ -1246,7 +1308,9 @@
 	irc_msg_handle_privmsg(irc, name, from, args[0], args[1], TRUE);
 }
 
-void irc_msg_nochangenick(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_nochangenick(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                     G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 
@@ -1257,7 +1321,9 @@
 		purple_request_cpar_from_connection(gc));
 }
 
-void irc_msg_part(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_part(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	PurpleConversation *chat;
@@ -1296,7 +1362,9 @@
 	g_free(nick);
 }
 
-void irc_msg_ping(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_ping(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             G_GNUC_UNUSED const char *from, char **args)
 {
 	char *buf;
 
@@ -1305,7 +1373,9 @@
 	g_free(buf);
 }
 
-void irc_msg_pong(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_pong(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConversation *convo;
 	PurpleConversationManager *manager;
@@ -1350,7 +1420,10 @@
 	irc_msg_handle_privmsg(irc, name, from, args[0], args[1], FALSE);
 }
 
-static void irc_msg_handle_privmsg(struct irc_conn *irc, const char *name, const char *from, const char *to, const char *rawmsg, gboolean notice)
+static void
+irc_msg_handle_privmsg(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                       const char *from, const char *to, const char *rawmsg,
+                       gboolean notice)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	PurpleConversation *chat;
@@ -1399,7 +1472,9 @@
 	g_free(nick);
 }
 
-void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_regonly(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	PurpleConversationManager *manager;
@@ -1423,7 +1498,9 @@
 	g_free(msg);
 }
 
-void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_quit(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+             const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	struct irc_buddy *ib;
@@ -1444,7 +1521,9 @@
 	g_free(data[0]);
 }
 
-void irc_msg_unavailable(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_unavailable(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                    G_GNUC_UNUSED const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 
@@ -1453,7 +1532,9 @@
 		purple_request_cpar_from_connection(gc));
 }
 
-void irc_msg_wallops(struct irc_conn *irc, const char *name, const char *from, char **args)
+void
+irc_msg_wallops(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                const char *from, char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 	char *nick, *msg;
@@ -1497,7 +1578,7 @@
 }
 
 static int
-irc_sasl_cb_log(void *context, int level, const char *message)
+irc_sasl_cb_log(G_GNUC_UNUSED void *context, int level, const char *message)
 {
 	if(level <= SASL_LOG_TRACE)
 		purple_debug_info("sasl", "%s\n", message);
@@ -1632,7 +1713,8 @@
 
 /* SASL authentication */
 void
-irc_msg_cap(struct irc_conn *irc, const char *name, const char *from, char **args)
+irc_msg_cap(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+            G_GNUC_UNUSED const char *from, char **args)
 {
 	int ret = 0;
 	int id = 0;
@@ -1664,22 +1746,22 @@
 	irc->sasl_cb = g_new0(sasl_callback_t, 5);
 
 	irc->sasl_cb[id].id = SASL_CB_AUTHNAME;
-	irc->sasl_cb[id].proc = (int (*)(void))irc_sasl_cb_simple; /* sasl_getsimple_t */
+	irc->sasl_cb[id].proc = (int (*)(void))(gpointer)irc_sasl_cb_simple; /* sasl_getsimple_t */
 	irc->sasl_cb[id].context = (void *)irc;
 	id++;
 
 	irc->sasl_cb[id].id = SASL_CB_USER;
-	irc->sasl_cb[id].proc = (int (*)(void))irc_sasl_cb_simple; /* sasl_getsimple_t */
+	irc->sasl_cb[id].proc = (int (*)(void))(gpointer)irc_sasl_cb_simple; /* sasl_getsimple_t */
 	irc->sasl_cb[id].context = (void *)irc;
 	id++;
 
 	irc->sasl_cb[id].id = SASL_CB_PASS;
-	irc->sasl_cb[id].proc = (int (*)(void))irc_sasl_cb_secret; /* sasl_getsecret_t */
+	irc->sasl_cb[id].proc = (int (*)(void))(gpointer)irc_sasl_cb_secret; /* sasl_getsecret_t */
 	irc->sasl_cb[id].context = (void *)irc;
 	id++;
 
 	irc->sasl_cb[id].id = SASL_CB_LOG;
-	irc->sasl_cb[id].proc = (int (*)(void))irc_sasl_cb_log; /* sasl_log_t */
+	irc->sasl_cb[id].proc = (int (*)(void))(gpointer)irc_sasl_cb_log; /* sasl_log_t */
 	irc->sasl_cb[id].context = (void *)irc;
 	id++;
 
@@ -1764,13 +1846,15 @@
 }
 
 void
-irc_msg_authenticate(struct irc_conn *irc, const char *name, const char *from, char **args)
+irc_msg_authenticate(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                     G_GNUC_UNUSED const char *from, char **args)
 {
 	irc_msg_auth(irc, args[0]);
 }
 
 void
-irc_msg_authok(struct irc_conn *irc, const char *name, const char *from, char **args)
+irc_msg_authok(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+               G_GNUC_UNUSED const char *from, G_GNUC_UNUSED char **args)
 {
 	char *buf;
 
@@ -1785,7 +1869,8 @@
 }
 
 void
-irc_msg_authtryagain(struct irc_conn *irc, const char *name, const char *from, char **args)
+irc_msg_authtryagain(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                     G_GNUC_UNUSED const char *from, G_GNUC_UNUSED char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 
@@ -1834,7 +1919,9 @@
 }
 
 void
-irc_msg_authfail(struct irc_conn *irc, const char *name, const char *from, char **args)
+irc_msg_authfail(struct irc_conn *irc, G_GNUC_UNUSED const char *name,
+                 G_GNUC_UNUSED const char *from,
+                 G_GNUC_UNUSED char **args)
 {
 	PurpleConnection *gc = purple_account_get_connection(irc->account);
 
diff --git a/libpurple/protocols/irc/parse.c b/libpurple/protocols/irc/parse.c
--- a/libpurple/protocols/irc/parse.c
+++ b/libpurple/protocols/irc/parse.c
@@ -173,8 +173,10 @@
 	{ NULL, NULL, NULL, NULL }
 };
 
-static PurpleCmdRet irc_parse_purple_cmd(PurpleConversation *conv, const gchar *cmd,
-                                        gchar **args, gchar **error, void *data)
+static PurpleCmdRet
+irc_parse_purple_cmd(PurpleConversation *conv, const gchar *cmd,
+                     gchar **args, G_GNUC_UNUSED gchar **error,
+                     G_GNUC_UNUSED gpointer data)
 {
 	PurpleConnection *gc;
 	struct irc_conn *irc;
@@ -238,7 +240,7 @@
 
 void irc_unregister_commands(void)
 {
-	g_slist_free_full(cmds, (GDestroyNotify)purple_cmd_unregister);
+	g_slist_free_full(cmds, (GDestroyNotify)(gpointer)purple_cmd_unregister);
 }
 
 static char *irc_send_convert(struct irc_conn *irc, const char *string)
@@ -631,7 +633,8 @@
 	}
 }
 
-char *irc_format(struct irc_conn *irc, const char *format, ...)
+char *
+irc_format(G_GNUC_UNUSED struct irc_conn *irc, const char *format, ...)
 {
 	GString *string = g_string_new("");
 	char *tok, *tmp;
@@ -650,7 +653,7 @@
 			break;
 		case ':':
 			g_string_append_c(string, ':');
-			/* no break! */
+			G_GNUC_FALLTHROUGH;
 		case 't':
 		case 'n':
 		case 'c':
@@ -804,7 +807,8 @@
 	g_free(from);
 }
 
-static void irc_parse_error_cb(struct irc_conn *irc, char *input)
+static void
+irc_parse_error_cb(G_GNUC_UNUSED struct irc_conn *irc, char *input)
 {
 	char *clean;
 	/* This really should be escaped somehow that you can tell what
