# HG changeset patch
# Node ID febe626249d0
# Parent  b79392754d74
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -271,7 +271,8 @@ request_password_ok_cb(PurpleAccount *ac
 }
 
 static void
-request_password_cancel_cb(PurpleAccount *account, PurpleRequestFields *fields)
+request_password_cancel_cb(PurpleAccount *account,
+                           G_GNUC_UNUSED PurpleRequestFields *fields)
 {
 	/* Disable the account as the user has cancelled connecting */
 	purple_account_set_enabled(account, FALSE);
@@ -1865,7 +1866,9 @@ purple_account_add_buddies(PurpleAccount
 		GList *groups;
 
 		/* Make a list of what group each buddy is in */
-		groups = g_list_copy_deep(buddies, (GCopyFunc)purple_buddy_get_group, NULL);
+		groups = g_list_copy_deep(buddies,
+		                          (GCopyFunc)(GCallback)purple_buddy_get_group,
+		                          NULL);
 
 		if(PURPLE_IS_PROTOCOL_SERVER(protocol)) {
 			purple_protocol_server_add_buddies(PURPLE_PROTOCOL_SERVER(protocol),
diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -35,8 +35,9 @@ static guint    save_timer = 0;
 static gboolean accounts_loaded = FALSE;
 
 static void
-purple_accounts_network_changed_cb(GNetworkMonitor *m, gboolean available,
-                                   gpointer data)
+purple_accounts_network_changed_cb(G_GNUC_UNUSED GNetworkMonitor *m,
+                                   gboolean available,
+                                   G_GNUC_UNUSED gpointer data)
 {
 	if(available) {
 		purple_accounts_restore_current_statuses();
@@ -89,7 +90,7 @@ sync_accounts(void)
 }
 
 static gboolean
-save_cb(gpointer data)
+save_cb(G_GNUC_UNUSED gpointer data)
 {
 	sync_accounts();
 	save_timer = 0;
@@ -597,8 +598,7 @@ purple_accounts_get_handle(void)
 }
 
 static void
-signed_on_cb(PurpleConnection *gc,
-             gpointer unused)
+signed_on_cb(PurpleConnection *gc, G_GNUC_UNUSED gpointer unused)
 {
 	PurpleAccount *account = purple_connection_get_account(gc);
 
@@ -607,8 +607,7 @@ signed_on_cb(PurpleConnection *gc,
 }
 
 static void
-signed_off_cb(PurpleConnection *gc,
-              gpointer unused)
+signed_off_cb(PurpleConnection *gc, G_GNUC_UNUSED gpointer unused)
 {
 	PurpleAccount *account = purple_connection_get_account(gc);
 
@@ -620,7 +619,7 @@ static void
 connection_error_cb(PurpleConnection *gc,
                     PurpleConnectionError type,
                     const gchar *description,
-                    gpointer unused)
+                    G_GNUC_UNUSED gpointer unused)
 {
 	PurpleAccount *account;
 	PurpleConnectionErrorInfo *err;
diff --git a/libpurple/buddy.c b/libpurple/buddy.c
--- a/libpurple/buddy.c
+++ b/libpurple/buddy.c
@@ -159,7 +159,7 @@ purple_buddy_get_property(GObject *obj, 
 }
 
 static void
-purple_buddy_init(PurpleBuddy *buddy) {
+purple_buddy_init(G_GNUC_UNUSED PurpleBuddy *buddy) {
 }
 
 static void
diff --git a/libpurple/buddyicon.c b/libpurple/buddyicon.c
--- a/libpurple/buddyicon.c
+++ b/libpurple/buddyicon.c
@@ -222,7 +222,7 @@ purple_buddy_icon_data_uncache_file(cons
  */
 
 static gboolean
-value_equals(gpointer key, gpointer value, gpointer user_data)
+value_equals(G_GNUC_UNUSED gpointer key, gpointer value, gpointer user_data)
 {
 	return (value == user_data);
 }
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -402,7 +402,7 @@ purple_blist_sync(void)
 }
 
 static gboolean
-save_cb(gpointer data)
+save_cb(G_GNUC_UNUSED gpointer data)
 {
 	purple_blist_sync();
 	save_timer = 0;
@@ -417,7 +417,8 @@ purple_blist_real_schedule_save(void)
 }
 
 static void
-purple_blist_real_save_account(PurpleBuddyList *list, PurpleAccount *account)
+purple_blist_real_save_account(G_GNUC_UNUSED PurpleBuddyList *list,
+                               G_GNUC_UNUSED PurpleAccount *account)
 {
 #if 1
 	purple_blist_real_schedule_save();
@@ -431,7 +432,8 @@ purple_blist_real_save_account(PurpleBud
 }
 
 static void
-purple_blist_real_save_node(PurpleBuddyList *list, PurpleBlistNode *node)
+purple_blist_real_save_node(G_GNUC_UNUSED PurpleBuddyList *list,
+                            G_GNUC_UNUSED PurpleBlistNode *node)
 {
 	purple_blist_real_schedule_save();
 }
@@ -725,7 +727,7 @@ purple_blist_get_root(PurpleBuddyList *l
 }
 
 static void
-append_buddy(gpointer key, gpointer value, gpointer user_data)
+append_buddy(G_GNUC_UNUSED gpointer key, gpointer value, gpointer user_data)
 {
 	GSList **list = user_data;
 	*list = g_slist_prepend(*list, value);
@@ -1616,7 +1618,8 @@ PurpleBuddy *purple_blist_find_buddy_in_
 	return g_hash_table_lookup(priv->buddies, &hb);
 }
 
-static void find_acct_buddies(gpointer key, gpointer value, gpointer data)
+static void
+find_acct_buddies(G_GNUC_UNUSED gpointer key, gpointer value, gpointer data)
 {
 	PurpleBuddy *buddy = value;
 	GSList **list = data;
diff --git a/libpurple/chat.c b/libpurple/chat.c
--- a/libpurple/chat.c
+++ b/libpurple/chat.c
@@ -221,7 +221,7 @@ purple_chat_get_property(GObject *obj, g
 
 /* GObject initialization function */
 static void
-purple_chat_init(PurpleChat *chat)
+purple_chat_init(G_GNUC_UNUSED PurpleChat *chat)
 {
 }
 
diff --git a/libpurple/circularbuffer.c b/libpurple/circularbuffer.c
--- a/libpurple/circularbuffer.c
+++ b/libpurple/circularbuffer.c
@@ -238,7 +238,7 @@ purple_circular_buffer_get_input(PurpleC
  * Object Stuff
  *****************************************************************************/
 static void
-purple_circular_buffer_init(PurpleCircularBuffer *buffer)
+purple_circular_buffer_init(G_GNUC_UNUSED PurpleCircularBuffer *buffer)
 {
 }
 
diff --git a/libpurple/core.c b/libpurple/core.c
--- a/libpurple/core.c
+++ b/libpurple/core.c
@@ -297,7 +297,7 @@ purple_core_quit(void)
 }
 
 gboolean
-purple_core_quit_cb(gpointer unused)
+purple_core_quit_cb(G_GNUC_UNUSED gpointer unused)
 {
 	purple_core_quit();
 
diff --git a/libpurple/countingnode.c b/libpurple/countingnode.c
--- a/libpurple/countingnode.c
+++ b/libpurple/countingnode.c
@@ -206,7 +206,7 @@ purple_counting_node_get_property(GObjec
 }
 
 static void
-purple_counting_node_init(PurpleCountingNode *counter)
+purple_counting_node_init(G_GNUC_UNUSED PurpleCountingNode *counter)
 {
 }
 
diff --git a/libpurple/group.c b/libpurple/group.c
--- a/libpurple/group.c
+++ b/libpurple/group.c
@@ -292,7 +292,7 @@ purple_group_get_property(GObject *obj, 
 
 /* GObject initialization function */
 static void
-purple_group_init(PurpleGroup *group) {
+purple_group_init(G_GNUC_UNUSED PurpleGroup *group) {
 }
 
 /* Called when done constructing */
diff --git a/libpurple/idle.c b/libpurple/idle.c
--- a/libpurple/idle.c
+++ b/libpurple/idle.c
@@ -224,36 +224,38 @@ check_idleness(void)
  * Check idle and set the timer to fire at the next idle-worth event
  */
 static gboolean
-check_idleness_timer(void)
-{
+check_idleness_timer(G_GNUC_UNUSED gpointer data) {
 	check_idleness();
-	if (time_until_next_idle_event == 0)
+	if (time_until_next_idle_event == 0) {
 		idle_timer = 0;
-	else
-	{
+	} else {
 		/* +1 for the boundary,
 		 * +1 more for g_timeout_add_seconds rounding. */
-		idle_timer = g_timeout_add_seconds(time_until_next_idle_event + 2, (GSourceFunc)check_idleness_timer, NULL);
+		idle_timer = g_timeout_add_seconds(time_until_next_idle_event + 2,
+		                                   G_SOURCE_FUNC(check_idleness_timer),
+		                                   NULL);
 	}
-	return FALSE;
+	return G_SOURCE_REMOVE;
 }
 
 static void
-im_msg_sent_cb(PurpleAccount *account, PurpleMessage *msg, void *data)
+im_msg_sent_cb(G_GNUC_UNUSED PurpleAccount *account,
+               G_GNUC_UNUSED PurpleMessage *msg, G_GNUC_UNUSED gpointer data)
 {
 	/* Check our idle time after an IM is sent */
 	check_idleness();
 }
 
 static void
-signing_on_cb(PurpleConnection *gc, void *data)
+signing_on_cb(G_GNUC_UNUSED PurpleConnection *connection,
+              G_GNUC_UNUSED gpointer data)
 {
 	/* When signing on a new account, check if the account should be idle */
 	check_idleness();
 }
 
 static void
-signing_off_cb(PurpleConnection *gc, void *data)
+signing_off_cb(PurpleConnection *gc, G_GNUC_UNUSED gpointer data)
 {
 	PurpleAccount *account;
 
@@ -262,12 +264,14 @@ signing_off_cb(PurpleConnection *gc, voi
 }
 
 static void
-idle_reporting_cb(const char *name, PurplePrefType type, gconstpointer val, gpointer data)
+idle_reporting_cb(G_GNUC_UNUSED const char *name,
+                  G_GNUC_UNUSED PurplePrefType type,
+                  G_GNUC_UNUSED gconstpointer val, G_GNUC_UNUSED gpointer data)
 {
 	if (idle_timer)
 		g_source_remove(idle_timer);
 	idle_timer = 0;
-	check_idleness_timer();
+	check_idleness_timer(NULL);
 }
 
 void
@@ -279,7 +283,7 @@ purple_idle_touch(void)
 		if (idle_timer)
 			g_source_remove(idle_timer);
 		idle_timer = 0;
-		check_idleness_timer();
+		check_idleness_timer(NULL);
 	}
 }
 
@@ -310,12 +314,15 @@ purple_idle_get_handle(void)
 	return &handle;
 }
 
-static gboolean _do_purple_idle_touch_cb(gpointer data)
+static gboolean
+_do_purple_idle_touch_cb(G_GNUC_UNUSED gpointer data)
 {
 	int idle_poll_minutes = purple_prefs_get_int("/purple/away/mins_before_away");
 
 	 /* +1 more for g_timeout_add_seconds rounding. */
-	idle_timer = g_timeout_add_seconds((idle_poll_minutes * 60) + 2, (GSourceFunc)check_idleness_timer, NULL);
+	idle_timer = g_timeout_add_seconds((idle_poll_minutes * 60) + 2,
+	                                   G_SOURCE_FUNC(check_idleness_timer),
+	                                   NULL);
 
 	purple_idle_touch();
 
diff --git a/libpurple/image-store.c b/libpurple/image-store.c
--- a/libpurple/image-store.c
+++ b/libpurple/image-store.c
@@ -121,7 +121,8 @@ remove_temporary(gpointer _image)
 }
 
 static void
-cancel_temporary(gpointer key, gpointer value, gpointer _unused)
+cancel_temporary(gpointer key, G_GNUC_UNUSED gpointer value,
+                 G_GNUC_UNUSED gpointer data)
 {
 	g_source_remove(GPOINTER_TO_INT(key));
 }
diff --git a/libpurple/image.c b/libpurple/image.c
--- a/libpurple/image.c
+++ b/libpurple/image.c
@@ -72,7 +72,7 @@ static void
  * Object stuff
  ******************************************************************************/
 static void
-purple_image_init(PurpleImage *image) {
+purple_image_init(G_GNUC_UNUSED PurpleImage *image) {
 }
 
 static void
diff --git a/libpurple/media.c b/libpurple/media.c
--- a/libpurple/media.c
+++ b/libpurple/media.c
@@ -475,7 +475,7 @@ purple_media_get_session_ids(PurpleMedia
 }
 
 GstElement *
-purple_media_get_src(PurpleMedia *media, const gchar *sess_id)
+purple_media_get_src(PurpleMedia *media, G_GNUC_UNUSED const char *sess_id)
 {
 	g_return_val_if_fail(PURPLE_IS_MEDIA(media), NULL);
 
@@ -829,7 +829,7 @@ purple_media_param_is_supported(PurpleMe
 }
 
 static void
-purple_media_new_local_candidate_cb(PurpleMediaBackend *backend,
+purple_media_new_local_candidate_cb(G_GNUC_UNUSED PurpleMediaBackend *backend,
 		const gchar *sess_id, const gchar *participant,
 		PurpleMediaCandidate *candidate, PurpleMedia *media)
 {
@@ -844,7 +844,7 @@ purple_media_new_local_candidate_cb(Purp
 }
 
 static void
-purple_media_candidates_prepared_cb(PurpleMediaBackend *backend,
+purple_media_candidates_prepared_cb(G_GNUC_UNUSED PurpleMediaBackend *backend,
 		const gchar *sess_id, const gchar *name, PurpleMedia *media)
 {
 	PurpleMediaStream *stream_data;
@@ -861,7 +861,7 @@ purple_media_candidates_prepared_cb(Purp
 /* callback called when a pair of transport candidates (local and remote)
  * has been established */
 static void
-purple_media_candidate_pair_established_cb(PurpleMediaBackend *backend,
+purple_media_candidate_pair_established_cb(G_GNUC_UNUSED PurpleMediaBackend *backend,
 		const gchar *sess_id, const gchar *name,
 		PurpleMediaCandidate *local_candidate,
 		PurpleMediaCandidate *remote_candidate,
@@ -916,7 +916,7 @@ purple_media_candidate_pair_established_
 }
 
 static void
-purple_media_codecs_changed_cb(PurpleMediaBackend *backend,
+purple_media_codecs_changed_cb(G_GNUC_UNUSED PurpleMediaBackend *backend,
 		const gchar *sess_id, PurpleMedia *media)
 {
 	g_signal_emit(media, purple_media_signals[CODECS_CHANGED], 0, sess_id);
@@ -1208,15 +1208,19 @@ purple_media_accepted(PurpleMedia *media
 	return accepted;
 }
 
-void purple_media_set_input_volume(PurpleMedia *media,
-		const gchar *session_id, double level)
+void
+purple_media_set_input_volume(PurpleMedia *media,
+                              G_GNUC_UNUSED const char *session_id,
+                              G_GNUC_UNUSED double level)
 {
 	g_return_if_fail(PURPLE_IS_MEDIA(media));
 }
 
-void purple_media_set_output_volume(PurpleMedia *media,
-		const gchar *session_id, const gchar *participant,
-		double level)
+void
+purple_media_set_output_volume(PurpleMedia *media,
+                               G_GNUC_UNUSED const char *session_id,
+                               G_GNUC_UNUSED const char *participant,
+                               G_GNUC_UNUSED double level)
 {
 	g_return_if_fail(PURPLE_IS_MEDIA(media));
 }
@@ -1252,8 +1256,8 @@ purple_media_remove_output_windows(Purpl
 }
 
 GstElement *
-purple_media_get_tee(PurpleMedia *media,
-		const gchar *session_id, const gchar *participant)
+purple_media_get_tee(PurpleMedia *media, G_GNUC_UNUSED const char *session_id,
+                     G_GNUC_UNUSED const char *participant)
 {
 	g_return_val_if_fail(PURPLE_IS_MEDIA(media), NULL);
 
diff --git a/libpurple/media/candidate.c b/libpurple/media/candidate.c
--- a/libpurple/media/candidate.c
+++ b/libpurple/media/candidate.c
@@ -351,7 +351,9 @@ purple_media_candidate_copy(PurpleMediaC
 GList *
 purple_media_candidate_list_copy(GList *candidates)
 {
-	return g_list_copy_deep(candidates, (GCopyFunc)purple_media_candidate_copy, NULL);
+	return g_list_copy_deep(candidates,
+	                        (GCopyFunc)(GCallback)purple_media_candidate_copy,
+	                        NULL);
 }
 
 void
diff --git a/libpurple/media/codec.c b/libpurple/media/codec.c
--- a/libpurple/media/codec.c
+++ b/libpurple/media/codec.c
@@ -345,7 +345,9 @@ purple_media_codec_copy(PurpleMediaCodec
 GList *
 purple_media_codec_list_copy(GList *codecs)
 {
-	return g_list_copy_deep(codecs, (GCopyFunc)purple_media_codec_copy, NULL);
+	return g_list_copy_deep(codecs,
+	                        (GCopyFunc)(GCallback)purple_media_codec_copy,
+	                        NULL);
 }
 
 void
diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c
--- a/libpurple/mediamanager.c
+++ b/libpurple/mediamanager.c
@@ -227,7 +227,8 @@ purple_media_manager_get(void)
 }
 
 static gboolean
-pipeline_bus_call(GstBus *bus, GstMessage *msg, PurpleMediaManager *manager)
+pipeline_bus_call(G_GNUC_UNUSED GstBus *bus, GstMessage *msg,
+                  G_GNUC_UNUSED PurpleMediaManager *manager)
 {
 	switch(GST_MESSAGE_TYPE(msg)) {
 		case GST_MESSAGE_EOS:
@@ -553,7 +554,8 @@ ensure_app_data_info_and_lock (PurpleMed
 
 
 static void
-request_pad_unlinked_cb(GstPad *pad, GstPad *peer, gpointer user_data)
+request_pad_unlinked_cb(GstPad *pad, G_GNUC_UNUSED GstPad *peer,
+                        G_GNUC_UNUSED gpointer user_data)
 {
 	GstElement *parent = GST_ELEMENT_PARENT(pad);
 	GstIterator *iter;
@@ -578,7 +580,8 @@ request_pad_unlinked_cb(GstPad *pad, Gst
 }
 
 static void
-nonunique_src_unlinked_cb(GstPad *pad, GstPad *peer, gpointer user_data)
+nonunique_src_unlinked_cb(GstPad *pad, G_GNUC_UNUSED GstPad *peer,
+                          G_GNUC_UNUSED gpointer user_data)
 {
 	GstElement *element = GST_ELEMENT_PARENT(pad);
 	gst_element_set_locked_state(element, TRUE);
@@ -712,7 +715,8 @@ call_appsrc_writable_locked (PurpleMedia
 }
 
 static void
-appsrc_need_data (GstAppSrc *appsrc, guint length, gpointer user_data)
+appsrc_need_data(G_GNUC_UNUSED GstAppSrc *appsrc, G_GNUC_UNUSED guint length,
+                 gpointer user_data)
 {
 	PurpleMediaAppDataInfo *info = user_data;
 	PurpleMediaManager *manager = purple_media_manager_get ();
@@ -729,7 +733,7 @@ appsrc_need_data (GstAppSrc *appsrc, gui
 }
 
 static void
-appsrc_enough_data (GstAppSrc *appsrc, gpointer user_data)
+appsrc_enough_data(G_GNUC_UNUSED GstAppSrc *appsrc, gpointer user_data)
 {
 	PurpleMediaAppDataInfo *info = user_data;
 	PurpleMediaManager *manager = purple_media_manager_get ();
@@ -743,7 +747,8 @@ appsrc_enough_data (GstAppSrc *appsrc, g
 }
 
 static gboolean
-appsrc_seek_data (GstAppSrc *appsrc, guint64 offset, gpointer user_data)
+appsrc_seek_data(G_GNUC_UNUSED GstAppSrc *appsrc, G_GNUC_UNUSED guint64 offset,
+                 G_GNUC_UNUSED gpointer user_data)
 {
 	return FALSE;
 }
@@ -770,9 +775,12 @@ appsrc_destroyed (PurpleMediaAppDataInfo
 }
 
 static void
-media_established_cb (PurpleMedia *media,const gchar *session_id,
-	const gchar *participant, PurpleMediaCandidate *local_candidate,
-	PurpleMediaCandidate *remote_candidate, PurpleMediaAppDataInfo *info)
+media_established_cb(G_GNUC_UNUSED PurpleMedia *media,
+                     G_GNUC_UNUSED const char *session_id,
+                     G_GNUC_UNUSED const char *participant,
+                     G_GNUC_UNUSED PurpleMediaCandidate *local_candidate,
+                     G_GNUC_UNUSED PurpleMediaCandidate *remote_candidate,
+                     PurpleMediaAppDataInfo *info)
 {
 	PurpleMediaManager *manager = purple_media_manager_get ();
 
@@ -787,8 +795,9 @@ media_established_cb (PurpleMedia *media
 }
 
 static GstElement *
-create_send_appsrc(PurpleMediaElementInfo *element_info, PurpleMedia *media,
-		const gchar *session_id, const gchar *participant)
+create_send_appsrc(G_GNUC_UNUSED PurpleMediaElementInfo *element_info,
+                   PurpleMedia *media, const char *session_id,
+                   const char *participant)
 {
 	PurpleMediaManager *manager = purple_media_manager_get ();
 	PurpleMediaAppDataInfo * info = ensure_app_data_info_and_lock (manager,
@@ -820,12 +829,14 @@ create_send_appsrc(PurpleMediaElementInf
 }
 
 static void
-appsink_eos (GstAppSink *appsink, gpointer user_data)
+appsink_eos(G_GNUC_UNUSED GstAppSink *appsink,
+            G_GNUC_UNUSED gpointer user_data)
 {
 }
 
 static GstFlowReturn
-appsink_new_preroll (GstAppSink *appsink, gpointer user_data)
+appsink_new_preroll(G_GNUC_UNUSED GstAppSink *appsink,
+                    G_GNUC_UNUSED gpointer user_data)
 {
 	return GST_FLOW_OK;
 }
@@ -904,7 +915,7 @@ call_appsink_readable_locked (PurpleMedi
 }
 
 static GstFlowReturn
-appsink_new_sample (GstAppSink *appsink, gpointer user_data)
+appsink_new_sample(G_GNUC_UNUSED GstAppSink *appsink, gpointer user_data)
 {
 	PurpleMediaManager *manager = purple_media_manager_get ();
 	PurpleMediaAppDataInfo *info = user_data;
@@ -936,8 +947,9 @@ appsink_destroyed (PurpleMediaAppDataInf
 }
 
 static GstElement *
-create_recv_appsink(PurpleMediaElementInfo *element_info, PurpleMedia *media,
-		const gchar *session_id, const gchar *participant)
+create_recv_appsink(G_GNUC_UNUSED PurpleMediaElementInfo *element_info,
+                    PurpleMedia *media, const char *session_id,
+                    const char *participant)
 {
 	PurpleMediaManager *manager = purple_media_manager_get ();
 	PurpleMediaAppDataInfo * info = ensure_app_data_info_and_lock (manager,
@@ -1755,8 +1767,10 @@ gst_class_to_purple_element_type(const g
 }
 
 static GstElement *
-gst_device_create_cb(PurpleMediaElementInfo *info, PurpleMedia *media,
-		const gchar *session_id, const gchar *participant)
+gst_device_create_cb(PurpleMediaElementInfo *info,
+                     G_GNUC_UNUSED PurpleMedia *media,
+                     G_GNUC_UNUSED const char *session_id,
+                     G_GNUC_UNUSED const char *participant)
 {
 	GstDevice *device;
 	GstElement *result;
@@ -1905,7 +1919,8 @@ purple_media_manager_unregister_gst_devi
 }
 
 static gboolean
-device_monitor_bus_cb(GstBus *bus, GstMessage *message, gpointer user_data)
+device_monitor_bus_cb(G_GNUC_UNUSED GstBus *bus, GstMessage *message,
+                      gpointer user_data)
 {
 	PurpleMediaManager *manager = user_data;
 	GstMessageType message_type;
@@ -1973,8 +1988,10 @@ purple_media_manager_enumerate_elements(
 }
 
 static GstElement *
-gst_factory_make_cb(PurpleMediaElementInfo *info, PurpleMedia *media,
-		const gchar *session_id, const gchar *participant)
+gst_factory_make_cb(PurpleMediaElementInfo *info,
+                    G_GNUC_UNUSED PurpleMedia *media,
+                    G_GNUC_UNUSED const char *session_id,
+                    G_GNUC_UNUSED const char *participant)
 {
 	gchar *id;
 	GstElement *element;
@@ -1989,15 +2006,18 @@ gst_factory_make_cb(PurpleMediaElementIn
 }
 
 static void
-autovideosink_child_added_cb (GstChildProxy *child_proxy, GObject *object,
-		gchar *name, gpointer user_data)
+autovideosink_child_added_cb(G_GNUC_UNUSED GstChildProxy *child_proxy,
+                             GObject *object, G_GNUC_UNUSED gchar *name,
+                             G_GNUC_UNUSED gpointer user_data)
 {
 	videosink_disable_last_sample(GST_ELEMENT(object));
 }
 
 static GstElement *
-default_video_sink_create_cb(PurpleMediaElementInfo *info, PurpleMedia *media,
-		const gchar *session_id, const gchar *participant)
+default_video_sink_create_cb(G_GNUC_UNUSED PurpleMediaElementInfo *info,
+                             G_GNUC_UNUSED PurpleMedia *media,
+                             G_GNUC_UNUSED const char *session_id,
+                             G_GNUC_UNUSED const char *participant)
 {
 	GstElement *videosink = gst_element_factory_make("autovideosink", NULL);
 
@@ -2008,8 +2028,10 @@ default_video_sink_create_cb(PurpleMedia
 }
 
 static GstElement *
-disabled_video_create_cb(PurpleMediaElementInfo *info, PurpleMedia *media,
-		const gchar *session_id, const gchar *participant)
+disabled_video_create_cb(G_GNUC_UNUSED PurpleMediaElementInfo *info,
+                         G_GNUC_UNUSED PurpleMedia *media,
+                         G_GNUC_UNUSED const char *session_id,
+                         G_GNUC_UNUSED const char *participant)
 {
 	GstElement *src = gst_element_factory_make("videotestsrc", NULL);
 
@@ -2020,8 +2042,10 @@ disabled_video_create_cb(PurpleMediaElem
 }
 
 static GstElement *
-test_video_create_cb(PurpleMediaElementInfo *info, PurpleMedia *media,
-		const gchar *session_id, const gchar *participant)
+test_video_create_cb(G_GNUC_UNUSED PurpleMediaElementInfo *info,
+                     G_GNUC_UNUSED PurpleMedia *media,
+                     G_GNUC_UNUSED const char *session_id,
+                     G_GNUC_UNUSED const char *participant)
 {
 	GstElement *src = gst_element_factory_make("videotestsrc", NULL);
 
diff --git a/libpurple/meson.build b/libpurple/meson.build
--- a/libpurple/meson.build
+++ b/libpurple/meson.build
@@ -322,7 +322,8 @@ libpurple = library('purple',
                     dependencies : # static_link_libs
                         [dnsapi, ws2_32, glib, gio, gplugin_dep, libsoup,
                          libxml, gdk_pixbuf, gstreamer, gstreamer_app, json,
-                         sqlite3, math])
+                         sqlite3, math],
+                    override_options : ['c_std=c99', 'warning_level=2'])
 
 install_headers(purple_coreheaders,
                 subdir : purple_include_base)
diff --git a/libpurple/nat-pmp.c b/libpurple/nat-pmp.c
--- a/libpurple/nat-pmp.c
+++ b/libpurple/nat-pmp.c
@@ -544,13 +544,17 @@ purple_pmp_get_public_ip(void)
 }
 
 gboolean
-purple_pmp_create_map(PurplePmpType type, unsigned short privateport, unsigned short publicport, int lifetime)
+purple_pmp_create_map(G_GNUC_UNUSED PurplePmpType type,
+                      G_GNUC_UNUSED unsigned short privateport,
+                      G_GNUC_UNUSED unsigned short publicport,
+                      G_GNUC_UNUSED int lifetime)
 {
 	return FALSE;
 }
 
 gboolean
-purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport)
+purple_pmp_destroy_map(G_GNUC_UNUSED PurplePmpType type,
+                       G_GNUC_UNUSED unsigned short privateport)
 {
 	return FALSE;
 }
diff --git a/libpurple/notify.c b/libpurple/notify.c
--- a/libpurple/notify.c
+++ b/libpurple/notify.c
@@ -679,7 +679,7 @@ purple_notify_is_valid_ui_handle(void *u
 }
 
 void
-purple_notify_close(PurpleNotifyType type, void *ui_handle)
+purple_notify_close(G_GNUC_UNUSED PurpleNotifyType type, void *ui_handle)
 {
 	GList *l;
 	PurpleNotifyUiOps *ops;
diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -46,8 +46,8 @@ static GList *plugins_to_disable = NULL;
  * Plugin API
  **************************************************************************/
 static gboolean
-plugin_loading_cb(GObject *manager, PurplePlugin *plugin, GError **error,
-                  gpointer data)
+plugin_loading_cb(G_GNUC_UNUSED GObject *manager, PurplePlugin *plugin,
+                  GError **error, G_GNUC_UNUSED gpointer data)
 {
 	PurplePluginInfo *info;
 	const gchar *info_error = NULL;
@@ -76,7 +76,7 @@ plugin_loading_cb(GObject *manager, Purp
 }
 
 static void
-plugin_loaded_cb(GObject *manager, PurplePlugin *plugin)
+plugin_loaded_cb(G_GNUC_UNUSED GObject *manager, PurplePlugin *plugin)
 {
 	PurplePluginInfo *info;
 	gchar *filename;
@@ -96,8 +96,8 @@ plugin_loaded_cb(GObject *manager, Purpl
 }
 
 static gboolean
-plugin_unloading_cb(GObject *manager, PurplePlugin *plugin, GError **error,
-                    gpointer data)
+plugin_unloading_cb(G_GNUC_UNUSED GObject *manager, PurplePlugin *plugin,
+                    G_GNUC_UNUSED GError **error, G_GNUC_UNUSED gpointer data)
 {
 	PurplePluginInfo *info;
 	gchar *filename;
@@ -116,7 +116,7 @@ plugin_unloading_cb(GObject *manager, Pu
 }
 
 static void
-plugin_unloaded_cb(GObject *manager, PurplePlugin *plugin)
+plugin_unloaded_cb(G_GNUC_UNUSED GObject *manager, PurplePlugin *plugin)
 {
 	PurplePluginInfo *info;
 
@@ -254,7 +254,7 @@ purple_plugin_is_internal(PurplePlugin *
 }
 
 GSList *
-purple_plugin_get_dependent_plugins(PurplePlugin *plugin)
+purple_plugin_get_dependent_plugins(G_GNUC_UNUSED PurplePlugin *plugin)
 {
 #warning TODO: Implement this when GPlugin can return dependent plugins.
 	return NULL;
diff --git a/libpurple/prefs.c b/libpurple/prefs.c
--- a/libpurple/prefs.c
+++ b/libpurple/prefs.c
@@ -230,7 +230,7 @@ sync_prefs(void)
 }
 
 static gboolean
-save_cb(gpointer data)
+save_cb(G_GNUC_UNUSED gpointer data)
 {
 	sync_prefs();
 	save_timer = 0;
@@ -252,12 +252,12 @@ schedule_prefs_save(void)
 static GList *prefs_stack = NULL;
 
 static void
-prefs_start_element_handler (GMarkupParseContext *context,
-		const gchar *element_name,
-		const gchar **attribute_names,
-		const gchar **attribute_values,
-		gpointer user_data,
-		GError **error)
+prefs_start_element_handler(G_GNUC_UNUSED GMarkupParseContext *context,
+                            const char *element_name,
+                            const char **attribute_names,
+                            const char **attribute_values,
+                            G_GNUC_UNUSED gpointer user_data,
+                            G_GNUC_UNUSED GError **error)
 {
 	PurplePrefType pref_type = PURPLE_PREF_NONE;
 	int i;
@@ -370,9 +370,10 @@ prefs_start_element_handler (GMarkupPars
 }
 
 static void
-prefs_end_element_handler(GMarkupParseContext *context,
-						  const gchar *element_name,
-						  gpointer user_data, GError **error)
+prefs_end_element_handler(G_GNUC_UNUSED GMarkupParseContext *context,
+                          const gchar *element_name,
+                          G_GNUC_UNUSED gpointer user_data,
+                          G_GNUC_UNUSED GError **error)
 {
 	if(prefs_stack && purple_strequal(element_name, "pref")) {
 		g_free(prefs_stack->data);
@@ -461,11 +462,10 @@ purple_prefs_load(void)
 	return TRUE;
 }
 
-
-
 static void
-prefs_save_cb(const char *name, PurplePrefType type, gconstpointer val,
-			  gpointer user_data)
+prefs_save_cb(const char *name, G_GNUC_UNUSED PurplePrefType type,
+              G_GNUC_UNUSED gconstpointer val,
+              G_GNUC_UNUSED gpointer user_data)
 {
 
 	if(!prefs_loaded)
@@ -700,14 +700,15 @@ void
 purple_prefs_add_path_list(const char *name, GList *value)
 {
 	struct purple_pref *pref;
+	GList *copy = NULL;
 
 	pref = add_pref(PURPLE_PREF_PATH_LIST, name);
 
 	if(!pref)
 		return;
 
-	pref->value.stringlist = g_list_concat(pref->value.stringlist,
-	        g_list_copy_deep(value, (GCopyFunc)g_strdup, NULL));
+	copy = g_list_copy_deep(value, (GCopyFunc)(GCallback)g_strdup, NULL);
+	pref->value.stringlist = g_list_concat(pref->value.stringlist, copy);
 }
 
 static void
@@ -982,7 +983,9 @@ purple_prefs_set_path_list(const char *n
 		}
 
 		g_list_free_full(pref->value.stringlist, g_free);
-		pref->value.stringlist = g_list_copy_deep(value, (GCopyFunc)g_strdup, NULL);
+		pref->value.stringlist = g_list_copy_deep(value,
+		                                          (GCopyFunc)(GCallback)g_strdup,
+		                                          NULL);
 
 		do_callbacks(name, pref);
 
@@ -1095,7 +1098,8 @@ purple_prefs_get_string_list(const char 
 		return NULL;
 	}
 
-	return g_list_copy_deep(pref->value.stringlist, (GCopyFunc)g_strdup, NULL);
+	return g_list_copy_deep(pref->value.stringlist,
+	                        (GCopyFunc)(GCallback)g_strdup, NULL);
 }
 
 const char *
@@ -1135,7 +1139,8 @@ purple_prefs_get_path_list(const char *n
 		return NULL;
 	}
 
-	return g_list_copy_deep(pref->value.stringlist, (GCopyFunc)g_strdup, NULL);
+	return g_list_copy_deep(pref->value.stringlist,
+	                        (GCopyFunc)(GCallback)g_strdup, NULL);
 }
 
 static void
diff --git a/libpurple/protocols.c b/libpurple/protocols.c
--- a/libpurple/protocols.c
+++ b/libpurple/protocols.c
@@ -271,7 +271,8 @@ void purple_protocol_got_user_status_dea
 
 static void
 do_protocol_change_account_status(PurpleAccount *account,
-								PurpleStatus *old_status, PurpleStatus *new_status)
+                                  G_GNUC_UNUSED PurpleStatus *old_status,
+                                  PurpleStatus *new_status)
 {
 	PurpleProtocol *protocol;
 	PurpleProtocolManager *manager;
diff --git a/libpurple/proxy.c b/libpurple/proxy.c
--- a/libpurple/proxy.c
+++ b/libpurple/proxy.c
@@ -225,8 +225,8 @@ purple_proxy_get_proxy_resolver(PurpleAc
 }
 
 static void
-proxy_pref_cb(const char *name, PurplePrefType type,
-			  gconstpointer value, gpointer data)
+proxy_pref_cb(const char *name, G_GNUC_UNUSED PurplePrefType type,
+              gconstpointer value, G_GNUC_UNUSED gpointer data)
 {
 	PurpleProxyInfo *info = purple_global_proxy_get_info();
 
diff --git a/libpurple/purpleaccountpresence.c b/libpurple/purpleaccountpresence.c
--- a/libpurple/purpleaccountpresence.c
+++ b/libpurple/purpleaccountpresence.c
@@ -55,7 +55,8 @@ purple_account_presence_set_account(Purp
  * PurplePresence Implementation
  *****************************************************************************/
 static void
-purple_account_presence_update_idle(PurplePresence *presence, gboolean old_idle)
+purple_account_presence_update_idle(PurplePresence *presence,
+                                    G_GNUC_UNUSED gboolean old_idle)
 {
 	PurpleAccountPresence *account_presence = PURPLE_ACCOUNT_PRESENCE(presence);
 	PurpleConnection *gc = NULL;
@@ -142,7 +143,7 @@ purple_account_presence_finalize(GObject
 }
 
 static void
-purple_account_presence_init(PurpleAccountPresence *presence) {
+purple_account_presence_init(G_GNUC_UNUSED PurpleAccountPresence *presence) {
 }
 
 static void
diff --git a/libpurple/purpleaddcontactrequest.c b/libpurple/purpleaddcontactrequest.c
--- a/libpurple/purpleaddcontactrequest.c
+++ b/libpurple/purpleaddcontactrequest.c
@@ -160,7 +160,8 @@ purple_add_contact_request_finalize(GObj
 }
 
 static void
-purple_add_contact_request_init(PurpleAddContactRequest *request) {
+purple_add_contact_request_init(G_GNUC_UNUSED PurpleAddContactRequest *request)
+{
 }
 
 static void
diff --git a/libpurple/purpleattachment.c b/libpurple/purpleattachment.c
--- a/libpurple/purpleattachment.c
+++ b/libpurple/purpleattachment.c
@@ -134,7 +134,7 @@ purple_attachment_finalize(GObject *obj)
 }
 
 static void
-purple_attachment_init(PurpleAttachment *attachment) {
+purple_attachment_init(G_GNUC_UNUSED PurpleAttachment *attachment) {
 }
 
 static void
diff --git a/libpurple/purpleauthorizationrequest.c b/libpurple/purpleauthorizationrequest.c
--- a/libpurple/purpleauthorizationrequest.c
+++ b/libpurple/purpleauthorizationrequest.c
@@ -171,7 +171,8 @@ purple_authorization_request_finalize(GO
 }
 
 static void
-purple_authorization_request_init(PurpleAuthorizationRequest *request) {
+purple_authorization_request_init(G_GNUC_UNUSED PurpleAuthorizationRequest *request)
+{
 }
 
 static void
diff --git a/libpurple/purplebuddypresence.c b/libpurple/purplebuddypresence.c
--- a/libpurple/purplebuddypresence.c
+++ b/libpurple/purplebuddypresence.c
@@ -225,7 +225,7 @@ purple_buddy_presence_finalize(GObject *
 }
 
 static void
-purple_buddy_presence_init(PurpleBuddyPresence *presence) {
+purple_buddy_presence_init(G_GNUC_UNUSED PurpleBuddyPresence *presence) {
 }
 
 static void
diff --git a/libpurple/purplecontact.c b/libpurple/purplecontact.c
--- a/libpurple/purplecontact.c
+++ b/libpurple/purplecontact.c
@@ -94,7 +94,7 @@ purple_contact_dispose(GObject *obj) {
 }
 
 static void
-purple_contact_init(PurpleContact *contact) {
+purple_contact_init(G_GNUC_UNUSED PurpleContact *contact) {
 }
 
 static void
diff --git a/libpurple/purplecontactmanager.c b/libpurple/purplecontactmanager.c
--- a/libpurple/purplecontactmanager.c
+++ b/libpurple/purplecontactmanager.c
@@ -71,10 +71,10 @@ purple_contact_manager_find_with_id_help
 }
 
 static gboolean
-purple_contact_manager_convert_icon_to_avatar(GBinding *binding,
+purple_contact_manager_convert_icon_to_avatar(G_GNUC_UNUSED GBinding *binding,
                                               const GValue *from_value,
                                               GValue *to_value,
-                                              gpointer user_data)
+                                              G_GNUC_UNUSED gpointer user_data)
 {
 	PurpleBuddyIcon *icon = g_value_get_pointer(from_value);
 	GdkPixbuf *avatar = NULL;
@@ -96,10 +96,10 @@ purple_contact_manager_convert_icon_to_a
 }
 
 static gboolean
-purple_contact_manager_convert_avatar_to_icon(GBinding *binding,
+purple_contact_manager_convert_avatar_to_icon(G_GNUC_UNUSED GBinding *binding,
                                               const GValue *from_value,
                                               GValue *to_value,
-                                              gpointer user_data)
+                                              G_GNUC_UNUSED gpointer user_data)
 {
 	PurpleBuddyIcon *icon = NULL;
 	GdkPixbuf *avatar = g_value_get_object(from_value);
diff --git a/libpurple/purpleconversation.c b/libpurple/purpleconversation.c
--- a/libpurple/purpleconversation.c
+++ b/libpurple/purpleconversation.c
@@ -264,7 +264,7 @@ purple_conversation_get_property(GObject
 }
 
 static void
-purple_conversation_init(PurpleConversation *conv) {
+purple_conversation_init(G_GNUC_UNUSED PurpleConversation *conv) {
 }
 
 static void
diff --git a/libpurple/purplecredentialprovider.c b/libpurple/purplecredentialprovider.c
--- a/libpurple/purplecredentialprovider.c
+++ b/libpurple/purplecredentialprovider.c
@@ -152,7 +152,8 @@ purple_credential_provider_finalize(GObj
 }
 
 static void
-purple_credential_provider_init(PurpleCredentialProvider *provider) {
+purple_credential_provider_init(G_GNUC_UNUSED PurpleCredentialProvider *provider)
+{
 }
 
 static void
diff --git a/libpurple/purpledebugui.c b/libpurple/purpledebugui.c
--- a/libpurple/purpledebugui.c
+++ b/libpurple/purpledebugui.c
@@ -59,6 +59,6 @@ purple_debug_ui_print(PurpleDebugUi *ui,
 G_DEFINE_INTERFACE(PurpleDebugUi, purple_debug_ui, G_TYPE_OBJECT);
 
 static void
-purple_debug_ui_default_init(PurpleDebugUiInterface *iface) {
+purple_debug_ui_default_init(G_GNUC_UNUSED PurpleDebugUiInterface *iface) {
 }
 
diff --git a/libpurple/purplehistoryadapter.c b/libpurple/purplehistoryadapter.c
--- a/libpurple/purplehistoryadapter.c
+++ b/libpurple/purplehistoryadapter.c
@@ -125,7 +125,7 @@ purple_history_adapter_finalize(GObject 
 }
 
 static void
-purple_history_adapter_init(PurpleHistoryAdapter *adapter) {
+purple_history_adapter_init(G_GNUC_UNUSED PurpleHistoryAdapter *adapter) {
 }
 
 static void
@@ -298,4 +298,4 @@ purple_history_adapter_write(PurpleHisto
 	            G_OBJECT_TYPE_NAME(G_OBJECT(adapter)));
 
 	return FALSE;
-}
\ No newline at end of file
+}
diff --git a/libpurple/purpleidleui.c b/libpurple/purpleidleui.c
--- a/libpurple/purpleidleui.c
+++ b/libpurple/purpleidleui.c
@@ -24,7 +24,7 @@
 G_DEFINE_INTERFACE(PurpleIdleUi, purple_idle_ui, G_TYPE_INVALID)
 
 static void
-purple_idle_ui_default_init(PurpleIdleUiInterface *iface) {
+purple_idle_ui_default_init(G_GNUC_UNUSED PurpleIdleUiInterface *iface) {
 }
 
 /******************************************************************************
diff --git a/libpurple/purpleimconversation.c b/libpurple/purpleimconversation.c
--- a/libpurple/purpleimconversation.c
+++ b/libpurple/purpleimconversation.c
@@ -156,7 +156,7 @@ purple_im_conversation_set_property(GObj
 }
 
 static void
-purple_im_conversation_init(PurpleIMConversation *im) {
+purple_im_conversation_init(G_GNUC_UNUSED PurpleIMConversation *im) {
 }
 
 static void
diff --git a/libpurple/purplenoopcredentialprovider.c b/libpurple/purplenoopcredentialprovider.c
--- a/libpurple/purplenoopcredentialprovider.c
+++ b/libpurple/purplenoopcredentialprovider.c
@@ -34,7 +34,7 @@ G_DEFINE_TYPE(PurpleNoopCredentialProvid
  *****************************************************************************/
 static void
 purple_noop_credential_provider_read_password_async(PurpleCredentialProvider *provider,
-                                                    PurpleAccount *account,
+                                                    G_GNUC_UNUSED PurpleAccount *account,
                                                     GCancellable *cancellable,
                                                     GAsyncReadyCallback callback,
                                                     gpointer data)
@@ -48,7 +48,7 @@ purple_noop_credential_provider_read_pas
 }
 
 static gchar *
-purple_noop_credential_provider_read_password_finish(PurpleCredentialProvider *provider,
+purple_noop_credential_provider_read_password_finish(G_GNUC_UNUSED PurpleCredentialProvider *provider,
                                                      GAsyncResult *result,
                                                      GError **error)
 {
@@ -57,8 +57,8 @@ purple_noop_credential_provider_read_pas
 
 static void
 purple_noop_credential_provider_write_password_async(PurpleCredentialProvider *provider,
-                                                     PurpleAccount *account,
-                                                     const gchar *password,
+                                                     G_GNUC_UNUSED PurpleAccount *account,
+                                                     G_GNUC_UNUSED const char *password,
                                                      GCancellable *cancellable,
                                                      GAsyncReadyCallback callback,
                                                      gpointer data)
@@ -72,7 +72,7 @@ purple_noop_credential_provider_write_pa
 }
 
 static gboolean
-purple_noop_credential_provider_write_password_finish(PurpleCredentialProvider *provider,
+purple_noop_credential_provider_write_password_finish(G_GNUC_UNUSED PurpleCredentialProvider *provider,
                                                       GAsyncResult *result,
                                                       GError **error)
 {
@@ -83,7 +83,8 @@ purple_noop_credential_provider_write_pa
  * GObject Implementation
  *****************************************************************************/
 static void
-purple_noop_credential_provider_init(PurpleNoopCredentialProvider *provider) {
+purple_noop_credential_provider_init(G_GNUC_UNUSED PurpleNoopCredentialProvider *provider)
+{
 }
 
 static void
diff --git a/libpurple/purpleoptions.c b/libpurple/purpleoptions.c
--- a/libpurple/purpleoptions.c
+++ b/libpurple/purpleoptions.c
@@ -32,8 +32,10 @@
  * Callbacks
  *****************************************************************************/
 static gboolean
-purple_options_force_online_cb(const gchar *option_name, const gchar *value,
-                               gpointer data, GError **error)
+purple_options_force_online_cb(G_GNUC_UNUSED const char *option_name,
+                               G_GNUC_UNUSED const char *value,
+                               G_GNUC_UNUSED gpointer data,
+                               G_GNUC_UNUSED GError **error)
 {
 	purple_network_force_online();
 
diff --git a/libpurple/purpleplugininfo.c b/libpurple/purpleplugininfo.c
--- a/libpurple/purpleplugininfo.c
+++ b/libpurple/purpleplugininfo.c
@@ -94,7 +94,7 @@ purple_plugin_info_set_action_menu(Purpl
  * GObject Implementation
  **************************************************************************/
 static void
-purple_plugin_info_init(PurplePluginInfo *info) {
+purple_plugin_info_init(G_GNUC_UNUSED PurplePluginInfo *info) {
 }
 
 static void
diff --git a/libpurple/purpleprotocol.c b/libpurple/purpleprotocol.c
--- a/libpurple/purpleprotocol.c
+++ b/libpurple/purpleprotocol.c
@@ -259,7 +259,7 @@ purple_protocol_set_property(GObject *ob
 }
 
 static void
-purple_protocol_init(PurpleProtocol *protocol) {
+purple_protocol_init(G_GNUC_UNUSED PurpleProtocol *protocol) {
 }
 
 static void
diff --git a/libpurple/purpleprotocolactions.c b/libpurple/purpleprotocolactions.c
--- a/libpurple/purpleprotocolactions.c
+++ b/libpurple/purpleprotocolactions.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolActions
                    PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_actions_default_init(PurpleProtocolActionsInterface *iface) {
+purple_protocol_actions_default_init(G_GNUC_UNUSED PurpleProtocolActionsInterface *iface)
+{
 }
 
 /******************************************************************************
diff --git a/libpurple/purpleprotocolchat.c b/libpurple/purpleprotocolchat.c
--- a/libpurple/purpleprotocolchat.c
+++ b/libpurple/purpleprotocolchat.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolChat, p
                    PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_chat_default_init(PurpleProtocolChatInterface *iface) {
+purple_protocol_chat_default_init(G_GNUC_UNUSED PurpleProtocolChatInterface *iface)
+{
 }
 
 /******************************************************************************
diff --git a/libpurple/purpleprotocolclient.c b/libpurple/purpleprotocolclient.c
--- a/libpurple/purpleprotocolclient.c
+++ b/libpurple/purpleprotocolclient.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolClient,
                    PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_client_default_init(PurpleProtocolClientInterface *iface) {
+purple_protocol_client_default_init(G_GNUC_UNUSED PurpleProtocolClientInterface *iface)
+{
 }
 
 /******************************************************************************
diff --git a/libpurple/purpleprotocolim.c b/libpurple/purpleprotocolim.c
--- a/libpurple/purpleprotocolim.c
+++ b/libpurple/purpleprotocolim.c
@@ -27,7 +27,8 @@
 G_DEFINE_INTERFACE(PurpleProtocolIM, purple_protocol_im, PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_im_default_init(PurpleProtocolIMInterface *iface) {
+purple_protocol_im_default_init(G_GNUC_UNUSED PurpleProtocolIMInterface *iface)
+{
 }
 
 /******************************************************************************
diff --git a/libpurple/purpleprotocolmanager.c b/libpurple/purpleprotocolmanager.c
--- a/libpurple/purpleprotocolmanager.c
+++ b/libpurple/purpleprotocolmanager.c
@@ -41,7 +41,7 @@ static PurpleProtocolManager *default_ma
  * GListModel Implementation
  *****************************************************************************/
 static GType
-purple_protocol_manager_get_item_type(GListModel *list) {
+purple_protocol_manager_get_item_type(G_GNUC_UNUSED GListModel *list) {
 	return PURPLE_TYPE_PROTOCOL;
 }
 
diff --git a/libpurple/purpleprotocolmedia.c b/libpurple/purpleprotocolmedia.c
--- a/libpurple/purpleprotocolmedia.c
+++ b/libpurple/purpleprotocolmedia.c
@@ -28,7 +28,8 @@ G_DEFINE_INTERFACE(PurpleProtocolMedia, 
                    PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_media_default_init(PurpleProtocolMediaInterface *iface) {
+purple_protocol_media_default_init(G_GNUC_UNUSED PurpleProtocolMediaInterface *iface)
+{
 }
 
 /******************************************************************************
@@ -58,14 +59,15 @@ purple_protocol_media_get_caps(PurplePro
 {
 	PurpleProtocolMediaInterface *iface = NULL;
 
-	g_return_val_if_fail(PURPLE_IS_PROTOCOL_MEDIA(media), PURPLE_MEDIA_NONE);
+	g_return_val_if_fail(PURPLE_IS_PROTOCOL_MEDIA(media),
+	                     PURPLE_MEDIA_CAPS_NONE);
 
 	iface = PURPLE_PROTOCOL_MEDIA_GET_IFACE(media);
 	if(iface && iface->get_caps) {
 		return iface->get_caps(media, account, who);
 	}
 
-	return PURPLE_MEDIA_NONE;
+	return PURPLE_MEDIA_CAPS_NONE;
 }
 
 gboolean
diff --git a/libpurple/purpleprotocolroomlist.c b/libpurple/purpleprotocolroomlist.c
--- a/libpurple/purpleprotocolroomlist.c
+++ b/libpurple/purpleprotocolroomlist.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolRoomlis
                    PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_roomlist_default_init(PurpleProtocolRoomlistInterface *iface) {
+purple_protocol_roomlist_default_init(G_GNUC_UNUSED PurpleProtocolRoomlistInterface *iface)
+{
 }
 
 /******************************************************************************
diff --git a/libpurple/purpleprotocolserver.c b/libpurple/purpleprotocolserver.c
--- a/libpurple/purpleprotocolserver.c
+++ b/libpurple/purpleprotocolserver.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolServer,
                    PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_server_default_init(PurpleProtocolServerInterface *iface) {
+purple_protocol_server_default_init(G_GNUC_UNUSED PurpleProtocolServerInterface *iface)
+{
 }
 
 /******************************************************************************
diff --git a/libpurple/purpleprotocolwhiteboard.c b/libpurple/purpleprotocolwhiteboard.c
--- a/libpurple/purpleprotocolwhiteboard.c
+++ b/libpurple/purpleprotocolwhiteboard.c
@@ -29,7 +29,7 @@ G_DEFINE_INTERFACE(PurpleProtocolWhitebo
                    PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_whiteboard_default_init(PurpleProtocolWhiteboardInterface *iface)
+purple_protocol_whiteboard_default_init(G_GNUC_UNUSED PurpleProtocolWhiteboardInterface *iface)
 {
 }
 
diff --git a/libpurple/purpleproxyinfo.c b/libpurple/purpleproxyinfo.c
--- a/libpurple/purpleproxyinfo.c
+++ b/libpurple/purpleproxyinfo.c
@@ -114,7 +114,7 @@ purple_proxy_info_finalize(GObject *obj)
 }
 
 static void
-purple_proxy_info_init(PurpleProxyInfo *info) {
+purple_proxy_info_init(G_GNUC_UNUSED PurpleProxyInfo *info) {
 }
 
 static void
diff --git a/libpurple/purplesqlitehistoryadapter.c b/libpurple/purplesqlitehistoryadapter.c
--- a/libpurple/purplesqlitehistoryadapter.c
+++ b/libpurple/purplesqlitehistoryadapter.c
@@ -295,7 +295,7 @@ purple_sqlite_history_adapter_activate(P
 
 static gboolean
 purple_sqlite_history_adapter_deactivate(PurpleHistoryAdapter *adapter,
-                                         GError **error)
+                                         G_GNUC_UNUSED GError **error)
 {
 	PurpleSqliteHistoryAdapter *sqlite_adapter = NULL;
 
@@ -570,7 +570,8 @@ purple_sqlite_history_adapter_finalize(G
 }
 
 static void
-purple_sqlite_history_adapter_init(PurpleSqliteHistoryAdapter *adapter) {
+purple_sqlite_history_adapter_init(G_GNUC_UNUSED PurpleSqliteHistoryAdapter *adapter)
+{
 }
 
 static void
diff --git a/libpurple/purpletags.c b/libpurple/purpletags.c
--- a/libpurple/purpletags.c
+++ b/libpurple/purpletags.c
@@ -49,7 +49,7 @@ purple_tags_dispose(GObject *obj) {
 }
 
 static void
-purple_tags_init(PurpleTags *tags) {
+purple_tags_init(G_GNUC_UNUSED PurpleTags *tags) {
 }
 
 static void
diff --git a/libpurple/purplewhiteboard.c b/libpurple/purplewhiteboard.c
--- a/libpurple/purplewhiteboard.c
+++ b/libpurple/purplewhiteboard.c
@@ -143,7 +143,7 @@ purple_whiteboard_get_property(GObject *
 }
 
 static void
-purple_whiteboard_init(PurpleWhiteboard *whiteboard) {
+purple_whiteboard_init(G_GNUC_UNUSED PurpleWhiteboard *whiteboard) {
 }
 
 static void
diff --git a/libpurple/queuedoutputstream.c b/libpurple/queuedoutputstream.c
--- a/libpurple/queuedoutputstream.c
+++ b/libpurple/queuedoutputstream.c
@@ -57,7 +57,7 @@ purple_queued_output_stream_push_bytes_a
 		/* Error occurred, return error */
 		g_task_return_error(task, error);
 		g_clear_object(&task);
-	} else if (size > written) {
+	} else if (size > (gsize)written) {
 		/* Partial write, prepare to send remaining data */
 		bytes = g_bytes_new_from_bytes(bytes, written, size - written);
 		g_task_set_task_data(task, bytes, (GDestroyNotify)g_bytes_unref);
diff --git a/libpurple/request.c b/libpurple/request.c
--- a/libpurple/request.c
+++ b/libpurple/request.c
@@ -1889,7 +1889,7 @@ purple_request_field_datasheet_get_sheet
 
 gboolean
 purple_request_field_email_validator(PurpleRequestField *field, gchar **errmsg,
-	void *user_data)
+                                     G_GNUC_UNUSED gpointer user_data)
 {
 	const char *value;
 
@@ -2418,7 +2418,7 @@ purple_request_close_info(PurpleRequestI
 }
 
 void
-purple_request_close(PurpleRequestType type, void *ui_handle)
+purple_request_close(G_GNUC_UNUSED PurpleRequestType type, void *ui_handle)
 {
 	GList *l;
 
diff --git a/libpurple/roomlist.c b/libpurple/roomlist.c
--- a/libpurple/roomlist.c
+++ b/libpurple/roomlist.c
@@ -228,7 +228,7 @@ purple_roomlist_get_property(GObject *ob
 }
 
 static void
-purple_roomlist_init(PurpleRoomlist *list)
+purple_roomlist_init(G_GNUC_UNUSED PurpleRoomlist *list)
 {
 }
 
diff --git a/libpurple/savedstatuses.c b/libpurple/savedstatuses.c
--- a/libpurple/savedstatuses.c
+++ b/libpurple/savedstatuses.c
@@ -343,7 +343,7 @@ sync_statuses(void)
 }
 
 static gboolean
-save_cb(gpointer data)
+save_cb(G_GNUC_UNUSED gpointer data)
 {
 	sync_statuses();
 	save_timer = 0;
diff --git a/libpurple/signals.c b/libpurple/signals.c
--- a/libpurple/signals.c
+++ b/libpurple/signals.c
@@ -309,7 +309,7 @@ purple_signal_disconnect(void *instance,
  *       to a handle.
  */
 static void
-disconnect_handle_from_signals(const char *signal,
+disconnect_handle_from_signals(G_GNUC_UNUSED const char *signal,
 							   PurpleSignalData *signal_data, void *handle)
 {
 	GList *l, *l_next;
@@ -332,7 +332,7 @@ disconnect_handle_from_signals(const cha
 }
 
 static void
-disconnect_handle_from_instance(void *instance,
+disconnect_handle_from_instance(G_GNUC_UNUSED gpointer instance,
 								PurpleInstanceData *instance_data,
 								void *handle)
 {
@@ -483,15 +483,15 @@ purple_signals_uninit(void)
  * Marshallers
  **************************************************************************/
 void
-purple_marshal_VOID(GCallback cb, va_list args, void *data,
-				  void **return_val)
+purple_marshal_VOID(GCallback cb, G_GNUC_UNUSED va_list args, void *data,
+                    G_GNUC_UNUSED void **return_val)
 {
 	((void (*)(void *))cb)(data);
 }
 
 void
 purple_marshal_VOID__POINTER(GCallback cb, va_list args, void *data,
-						   void **return_val)
+                             G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 
@@ -499,8 +499,8 @@ purple_marshal_VOID__POINTER(GCallback c
 }
 
 void
-purple_marshal_VOID__POINTER_UINT(GCallback cb, va_list args,
-										void *data, void **return_val)
+purple_marshal_VOID__POINTER_UINT(GCallback cb, va_list args, void *data,
+                                  G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	guint arg2 = va_arg(args, guint);
@@ -508,8 +508,9 @@ purple_marshal_VOID__POINTER_UINT(GCallb
 	((void (*)(void *, guint, void *))cb)(arg1, arg2, data);
 }
 
-void purple_marshal_VOID__POINTER_INT_INT(GCallback cb, va_list args,
-                                        void *data, void **return_val)
+void
+purple_marshal_VOID__POINTER_INT_INT(GCallback cb, va_list args, void *data,
+                                     G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	gint arg2 = va_arg(args, gint);
@@ -518,8 +519,9 @@ void purple_marshal_VOID__POINTER_INT_IN
 	((void (*)(void *, gint, gint, void *))cb)(arg1, arg2, arg3, data);
 }
 
-void purple_marshal_VOID__POINTER_INT_POINTER(GCallback cb, va_list args,
-                                              void *data, void **return_val)
+void
+purple_marshal_VOID__POINTER_INT_POINTER(GCallback cb, va_list args, void *data,
+                                         G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	gint arg2 = va_arg(args, gint);
@@ -529,8 +531,8 @@ void purple_marshal_VOID__POINTER_INT_PO
 }
 
 void
-purple_marshal_VOID__POINTER_POINTER(GCallback cb, va_list args,
-								   void *data, void **return_val)
+purple_marshal_VOID__POINTER_POINTER(GCallback cb, va_list args, void *data,
+                                     G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
@@ -539,8 +541,8 @@ purple_marshal_VOID__POINTER_POINTER(GCa
 }
 
 void
-purple_marshal_VOID__POINTER_POINTER_UINT(GCallback cb, va_list args,
-										void *data, void **return_val)
+purple_marshal_VOID__POINTER_POINTER_UINT(GCallback cb, va_list args, void *data,
+                                          G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
@@ -551,7 +553,8 @@ purple_marshal_VOID__POINTER_POINTER_UIN
 
 void
 purple_marshal_VOID__POINTER_POINTER_UINT_UINT(GCallback cb, va_list args,
-										     void *data, void **return_val)
+                                               void *data,
+                                               G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
@@ -562,8 +565,8 @@ purple_marshal_VOID__POINTER_POINTER_UIN
 }
 
 void
-purple_marshal_VOID__POINTER_UINT_UINT(GCallback cb, va_list args,
-										     void *data, void **return_val)
+purple_marshal_VOID__POINTER_UINT_UINT(GCallback cb, va_list args, void *data,
+                                       G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	guint arg2 = va_arg(args, guint);
@@ -574,7 +577,8 @@ purple_marshal_VOID__POINTER_UINT_UINT(G
 
 void
 purple_marshal_VOID__POINTER_POINTER_POINTER(GCallback cb, va_list args,
-										   void *data, void **return_val)
+                                             void *data,
+                                             G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
@@ -585,9 +589,8 @@ purple_marshal_VOID__POINTER_POINTER_POI
 
 void
 purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER(GCallback cb,
-												   va_list args,
-												   void *data,
-												   void **return_val)
+                                                     va_list args, void *data,
+                                                     G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
@@ -599,9 +602,9 @@ purple_marshal_VOID__POINTER_POINTER_POI
 
 void
 purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER(GCallback cb,
-														   va_list args,
-														   void *data,
-														   void **return_val)
+                                                             va_list args,
+                                                             void *data,
+                                                             G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
@@ -614,9 +617,8 @@ purple_marshal_VOID__POINTER_POINTER_POI
 
 void
 purple_marshal_VOID__POINTER_POINTER_POINTER_UINT(GCallback cb,
-												   va_list args,
-												   void *data,
-												   void **return_val)
+                                                  va_list args, void *data,
+                                                  G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
@@ -628,9 +630,9 @@ purple_marshal_VOID__POINTER_POINTER_POI
 
 void
 purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT(GCallback cb,
-													    va_list args,
-													    void *data,
-													    void **return_val)
+                                                          va_list args,
+                                                          void *data,
+                                                          G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
@@ -643,9 +645,9 @@ purple_marshal_VOID__POINTER_POINTER_POI
 
 void
 purple_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT(GCallback cb,
-													 va_list args,
-													 void *data,
-													 void **return_val)
+                                                       va_list args,
+                                                       void *data,
+                                                       G_GNUC_UNUSED void **return_val)
 {
 	void *arg1 = va_arg(args, void *);
 	void *arg2 = va_arg(args, void *);
diff --git a/libpurple/status.c b/libpurple/status.c
--- a/libpurple/status.c
+++ b/libpurple/status.c
@@ -1192,8 +1192,9 @@ purple_status_new(PurpleStatusType *stat
 * Status subsystem
 **************************************************************************/
 static void
-score_pref_changed_cb(const char *name, PurplePrefType type,
-					  gconstpointer value, gpointer data)
+score_pref_changed_cb(G_GNUC_UNUSED const char *name,
+                      G_GNUC_UNUSED PurplePrefType type, gconstpointer value,
+                      gpointer data)
 {
 	int index = GPOINTER_TO_INT(data);
 
diff --git a/libpurple/stun.c b/libpurple/stun.c
--- a/libpurple/stun.c
+++ b/libpurple/stun.c
@@ -136,7 +136,7 @@ static gboolean timeoutfunc(gpointer dat
 }
 
 static gboolean
-reply_cb(GSocket *socket, GIOCondition condition, gpointer data)
+reply_cb(GSocket *socket, G_GNUC_UNUSED GIOCondition condition, gpointer data)
 {
 	struct stun_conn *sc = data;
 	gchar buffer[65536];
diff --git a/libpurple/xfer.c b/libpurple/xfer.c
--- a/libpurple/xfer.c
+++ b/libpurple/xfer.c
@@ -147,7 +147,7 @@ static guint signals[SIG_LAST] = {0};
 
 G_DEFINE_TYPE_WITH_PRIVATE(PurpleXfer, purple_xfer, G_TYPE_OBJECT);
 
-static int purple_xfer_choose_file(PurpleXfer *xfer);
+static void purple_xfer_choose_file(PurpleXfer *xfer);
 
 static const gchar *
 purple_xfer_status_type_to_string(PurpleXferStatus type)
@@ -403,7 +403,8 @@ purple_xfer_choose_file_ok_cb(void *user
 }
 
 static void
-purple_xfer_choose_file_cancel_cb(void *user_data, const char *filename)
+purple_xfer_choose_file_cancel_cb(void *user_data,
+                                  G_GNUC_UNUSED const char *filename)
 {
 	PurpleXfer *xfer = (PurpleXfer *)user_data;
 
@@ -415,7 +416,7 @@ purple_xfer_choose_file_cancel_cb(void *
 	g_object_unref(xfer);
 }
 
-static int
+static void
 purple_xfer_choose_file(PurpleXfer *xfer)
 {
 	purple_request_file(xfer, NULL, purple_xfer_get_filename(xfer),
@@ -424,8 +425,6 @@ purple_xfer_choose_file(PurpleXfer *xfer
 		G_CALLBACK(purple_xfer_choose_file_cancel_cb),
 		purple_request_cpar_from_account(purple_xfer_get_account(xfer)),
 		xfer);
-
-	return 0;
 }
 
 static int
@@ -1313,7 +1312,7 @@ purple_xfer_read_file(PurpleXfer *xfer, 
 	g_return_val_if_fail(buffer != NULL, 0);
 
 	g_signal_emit(xfer, signals[SIG_READ_LOCAL], 0, buffer, size, &got_len);
-	if (got_len < 0 || got_len > size) {
+	if (got_len < 0 || (gsize)got_len > size) {
 		purple_debug_error("xfer", "Unable to read file.");
 		purple_xfer_cancel_local(xfer);
 		return -1;
@@ -1482,7 +1481,8 @@ do_transfer(PurpleXfer *xfer)
 }
 
 static void
-transfer_cb(gpointer data, gint source, PurpleInputCondition condition)
+transfer_cb(gpointer data, G_GNUC_UNUSED gint source,
+            G_GNUC_UNUSED PurpleInputCondition condition)
 {
 	PurpleXfer *xfer = data;
 	PurpleXferPrivate *priv = purple_xfer_get_instance_private(xfer);
@@ -2534,7 +2534,8 @@ G_DEFINE_INTERFACE(PurpleProtocolXfer, p
                    PURPLE_TYPE_PROTOCOL)
 
 static void
-purple_protocol_xfer_default_init(PurpleProtocolXferInterface *face) {
+purple_protocol_xfer_default_init(G_GNUC_UNUSED PurpleProtocolXferInterface *face)
+{
 }
 
 gboolean
diff --git a/libpurple/xmlnode.c b/libpurple/xmlnode.c
--- a/libpurple/xmlnode.c
+++ b/libpurple/xmlnode.c
@@ -634,10 +634,15 @@ struct _xmlnode_parser_data {
 };
 
 static void
-purple_xmlnode_parser_element_start_libxml(void *user_data,
-				   const xmlChar *element_name, const xmlChar *prefix, const xmlChar *xmlns,
-				   int nb_namespaces, const xmlChar **namespaces,
-				   int nb_attributes, int nb_defaulted, const xmlChar **attributes)
+purple_xmlnode_parser_element_start_libxml(gpointer user_data,
+                                           const xmlChar *element_name,
+                                           const xmlChar *prefix,
+                                           const xmlChar *xmlns,
+                                           int nb_namespaces,
+                                           const xmlChar **namespaces,
+                                           int nb_attributes,
+                                           G_GNUC_UNUSED int nb_defaulted,
+                                           const xmlChar **attributes)
 {
 	struct _xmlnode_parser_data *xpd = user_data;
 	PurpleXmlNode *node;
@@ -685,8 +690,10 @@ purple_xmlnode_parser_element_start_libx
 }
 
 static void
-purple_xmlnode_parser_element_end_libxml(void *user_data, const xmlChar *element_name,
-				 const xmlChar *prefix, const xmlChar *xmlns)
+purple_xmlnode_parser_element_end_libxml(gpointer user_data,
+                                         const xmlChar *element_name,
+                                         G_GNUC_UNUSED const xmlChar *prefix,
+                                         G_GNUC_UNUSED const xmlChar *xmlns)
 {
 	struct _xmlnode_parser_data *xpd = user_data;
 
diff --git a/purple-history/meson.build b/purple-history/meson.build
--- a/purple-history/meson.build
+++ b/purple-history/meson.build
@@ -5,5 +5,5 @@ PURPLE_HISTORY_SOURCES = [
 purple_history = executable('purple-history',
 	PURPLE_HISTORY_SOURCES,
 	dependencies : [libpurple_dep, glib],
-	install : true)
-
+	install : true,
+	override_options : ['c_std=c99', 'warning_level=2'])
diff --git a/purple-history/purplehistorycore.c b/purple-history/purplehistorycore.c
--- a/purple-history/purplehistorycore.c
+++ b/purple-history/purplehistorycore.c
@@ -55,6 +55,7 @@ purple_history_query(const gchar *query,
 	return TRUE;
 }
 
+G_GNUC_UNUSED
 static gboolean
 purple_history_remove(const gchar *query, GError **error) {
 	PurpleHistoryManager *manager = purple_history_manager_get_default();
