summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpurple/account.c7
-rw-r--r--libpurple/accounts.c15
-rw-r--r--libpurple/buddy.c2
-rw-r--r--libpurple/buddyicon.c2
-rw-r--r--libpurple/buddylist.c13
-rw-r--r--libpurple/chat.c2
-rw-r--r--libpurple/circularbuffer.c2
-rw-r--r--libpurple/core.c2
-rw-r--r--libpurple/countingnode.c2
-rw-r--r--libpurple/group.c2
-rw-r--r--libpurple/idle.c37
-rw-r--r--libpurple/image-store.c3
-rw-r--r--libpurple/image.c2
-rw-r--r--libpurple/media.c28
-rw-r--r--libpurple/media/candidate.c4
-rw-r--r--libpurple/media/codec.c4
-rw-r--r--libpurple/mediamanager.c82
-rw-r--r--libpurple/meson.build3
-rw-r--r--libpurple/nat-pmp.c8
-rw-r--r--libpurple/notify.c2
-rw-r--r--libpurple/plugins.c14
-rw-r--r--libpurple/prefs.c43
-rw-r--r--libpurple/protocols.c3
-rw-r--r--libpurple/proxy.c4
-rw-r--r--libpurple/purpleaccountpresence.c5
-rw-r--r--libpurple/purpleaddcontactrequest.c3
-rw-r--r--libpurple/purpleattachment.c2
-rw-r--r--libpurple/purpleauthorizationrequest.c3
-rw-r--r--libpurple/purplebuddypresence.c2
-rw-r--r--libpurple/purplecontact.c2
-rw-r--r--libpurple/purplecontactmanager.c8
-rw-r--r--libpurple/purpleconversation.c2
-rw-r--r--libpurple/purplecredentialprovider.c3
-rw-r--r--libpurple/purpledebugui.c2
-rw-r--r--libpurple/purplehistoryadapter.c4
-rw-r--r--libpurple/purpleidleui.c2
-rw-r--r--libpurple/purpleimconversation.c2
-rw-r--r--libpurple/purplenoopcredentialprovider.c13
-rw-r--r--libpurple/purpleoptions.c6
-rw-r--r--libpurple/purpleplugininfo.c2
-rw-r--r--libpurple/purpleprotocol.c2
-rw-r--r--libpurple/purpleprotocolactions.c3
-rw-r--r--libpurple/purpleprotocolchat.c3
-rw-r--r--libpurple/purpleprotocolclient.c3
-rw-r--r--libpurple/purpleprotocolim.c3
-rw-r--r--libpurple/purpleprotocolmanager.c2
-rw-r--r--libpurple/purpleprotocolmedia.c8
-rw-r--r--libpurple/purpleprotocolroomlist.c3
-rw-r--r--libpurple/purpleprotocolserver.c3
-rw-r--r--libpurple/purpleprotocolwhiteboard.c2
-rw-r--r--libpurple/purpleproxyinfo.c2
-rw-r--r--libpurple/purplesqlitehistoryadapter.c5
-rw-r--r--libpurple/purpletags.c2
-rw-r--r--libpurple/purplewhiteboard.c2
-rw-r--r--libpurple/queuedoutputstream.c2
-rw-r--r--libpurple/request.c4
-rw-r--r--libpurple/roomlist.c2
-rw-r--r--libpurple/savedstatuses.c2
-rw-r--r--libpurple/signals.c70
-rw-r--r--libpurple/status.c5
-rw-r--r--libpurple/stun.c2
-rw-r--r--libpurple/xfer.c17
-rw-r--r--libpurple/xmlnode.c19
-rw-r--r--purple-history/meson.build4
-rw-r--r--purple-history/purplehistorycore.c1
65 files changed, 301 insertions, 217 deletions
diff --git a/libpurple/account.c b/libpurple/account.c
index 846608a123..b6ddada462 100644
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -271,7 +271,8 @@ request_password_ok_cb(PurpleAccount *account, PurpleRequestFields *fields)
}
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 *account, GList *buddies, const char *m
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
index cc451dbf69..1d825a4962 100644
--- 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
index af5c3f9f59..f4e096b038 100644
--- a/libpurple/buddy.c
+++ b/libpurple/buddy.c
@@ -159,7 +159,7 @@ purple_buddy_get_property(GObject *obj, guint param_id, GValue *value,
}
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
index 781a7925e0..da99a8504f 100644
--- a/libpurple/buddyicon.c
+++ b/libpurple/buddyicon.c
@@ -222,7 +222,7 @@ purple_buddy_icon_data_uncache_file(const char *filename)
*/
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
index fd80ff855e..df3d2bfe45 100644
--- 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(PurpleBuddyList *list, PurpleAccount *account)
}
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 *list)
}
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_group(PurpleAccount *account, const char
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
index 0dc1171f5e..6d47cf11c7 100644
--- a/libpurple/chat.c
+++ b/libpurple/chat.c
@@ -221,7 +221,7 @@ purple_chat_get_property(GObject *obj, guint param_id, GValue *value,
/* 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
index 1c9045a29e..623c1e7d15 100644
--- a/libpurple/circularbuffer.c
+++ b/libpurple/circularbuffer.c
@@ -238,7 +238,7 @@ purple_circular_buffer_get_input(PurpleCircularBuffer *buffer) {
* 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
index 3314694917..e0c352f627 100644
--- 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
index fa8ba22444..a654713157 100644
--- a/libpurple/countingnode.c
+++ b/libpurple/countingnode.c
@@ -206,7 +206,7 @@ purple_counting_node_get_property(GObject *obj, guint param_id, GValue *value,
}
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
index 435c81607a..cf50c82533 100644
--- a/libpurple/group.c
+++ b/libpurple/group.c
@@ -292,7 +292,7 @@ purple_group_get_property(GObject *obj, guint param_id, GValue *value,
/* 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
index 455899b2c0..372ba64a2c 100644
--- 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, void *data)
}
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
index 6e3deaef93..f92e53dbc2 100644
--- 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
index 1bfd313444..9dfa63f580 100644
--- a/libpurple/image.c
+++ b/libpurple/image.c
@@ -72,7 +72,7 @@ _purple_image_set_contents(PurpleImage *image, GBytes *bytes) {
* 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
index 34007295ee..87bf0b955c 100644
--- a/libpurple/media.c
+++ b/libpurple/media.c
@@ -475,7 +475,7 @@ purple_media_get_session_ids(PurpleMedia *media)
}
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(PurpleMedia *media, const gchar *param)
}
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(PurpleMediaBackend *backend,
}
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(PurpleMediaBackend *backend,
/* 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_cb(PurpleMediaBackend *backend,
}
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, const gchar *sess_id,
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(PurpleMedia *media)
}
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
index d76076d443..ae129bb74e 100644
--- a/libpurple/media/candidate.c
+++ b/libpurple/media/candidate.c
@@ -351,7 +351,9 @@ purple_media_candidate_copy(PurpleMediaCandidate *candidate)
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
index f70253f5f4..7257543c01 100644
--- a/libpurple/media/codec.c
+++ b/libpurple/media/codec.c
@@ -345,7 +345,9 @@ purple_media_codec_copy(PurpleMediaCodec *codec)
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
index 7593eb63e9..a4adb4184a 100644
--- 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 (PurpleMediaManager *manager, PurpleMedia *media,
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, GstPad *peer, gpointer user_data)
}
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 (PurpleMediaAppDataInfo *info)
}
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, guint length, gpointer user_data)
}
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, gpointer user_data)
}
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 *info)
}
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,const gchar *session_id,
}
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(PurpleMediaElementInfo *element_info, PurpleMedia *media,
}
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 (PurpleMediaAppDataInfo *info)
}
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 (PurpleMediaAppDataInfo *info)
}
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 gchar *device_class)
}
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_device(PurpleMediaManager *manager,
}
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(PurpleMediaManager *manager,
}
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(PurpleMediaElementInfo *info, PurpleMedia *media,
}
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(PurpleMediaElementInfo *info, PurpleMedia *media,
}
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(PurpleMediaElementInfo *info, PurpleMedia *media,
}
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
index b11fa54d1e..797d9ebca5 100644
--- 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
index 1d0cad7ddd..a044846fad 100644
--- 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
index 47c28226f1..08d1d36a2a 100644
--- a/libpurple/notify.c
+++ b/libpurple/notify.c
@@ -679,7 +679,7 @@ purple_notify_is_valid_ui_handle(void *ui_handle, PurpleNotifyType *type)
}
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
index f3b6afefb3..e5fa71de3f 100644
--- 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, PurplePlugin *plugin, GError **error,
}
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, PurplePlugin *plugin)
}
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, PurplePlugin *plugin, GError **error,
}
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 *plugin)
}
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
index 4ca3c425e9..84e72ecf1c 100644
--- 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 (GMarkupParseContext *context,
}
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 *name, GList *value)
}
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 *name)
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 *name)
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
index d640a449cc..f1ed1f8c78 100644
--- a/libpurple/protocols.c
+++ b/libpurple/protocols.c
@@ -271,7 +271,8 @@ void purple_protocol_got_user_status_deactive(PurpleAccount *account, const char
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
index 6f3e2f91bd..ce9555899f 100644
--- a/libpurple/proxy.c
+++ b/libpurple/proxy.c
@@ -225,8 +225,8 @@ purple_proxy_get_proxy_resolver(PurpleAccount *account, GError **error)
}
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
index 51d2efe364..2f5cfd813f 100644
--- a/libpurple/purpleaccountpresence.c
+++ b/libpurple/purpleaccountpresence.c
@@ -55,7 +55,8 @@ purple_account_presence_set_account(PurpleAccountPresence *presence,
* 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 *obj) {
}
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
index 0a22ee8de7..e67f97b6f8 100644
--- a/libpurple/purpleaddcontactrequest.c
+++ b/libpurple/purpleaddcontactrequest.c
@@ -160,7 +160,8 @@ purple_add_contact_request_finalize(GObject *obj) {
}
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
index 53eba43dea..4dc380f046 100644
--- 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
index ede1528106..a7171c1551 100644
--- a/libpurple/purpleauthorizationrequest.c
+++ b/libpurple/purpleauthorizationrequest.c
@@ -171,7 +171,8 @@ purple_authorization_request_finalize(GObject *obj) {
}
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
index 30bbb442e0..b1e995e25b 100644
--- a/libpurple/purplebuddypresence.c
+++ b/libpurple/purplebuddypresence.c
@@ -225,7 +225,7 @@ purple_buddy_presence_finalize(GObject *obj) {
}
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
index 6fad919e53..fa8e690e68 100644
--- 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
index 513cb88060..5ff6514d53 100644
--- a/libpurple/purplecontactmanager.c
+++ b/libpurple/purplecontactmanager.c
@@ -71,10 +71,10 @@ purple_contact_manager_find_with_id_helper(gconstpointer a, gconstpointer b) {
}
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_avatar(GBinding *binding,
}
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
index 5bda182df0..38593eb57b 100644
--- a/libpurple/purpleconversation.c
+++ b/libpurple/purpleconversation.c
@@ -264,7 +264,7 @@ purple_conversation_get_property(GObject *obj, guint param_id, GValue *value,
}
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
index 92bfe937a7..141d69f4d1 100644
--- a/libpurple/purplecredentialprovider.c
+++ b/libpurple/purplecredentialprovider.c
@@ -152,7 +152,8 @@ purple_credential_provider_finalize(GObject *obj) {
}
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
index c1e63d7eb8..34320a1786 100644
--- a/libpurple/purpledebugui.c
+++ b/libpurple/purpledebugui.c
@@ -59,6 +59,6 @@ purple_debug_ui_print(PurpleDebugUi *ui, PurpleDebugLevel level,
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
index 411639c79e..cf17e382fc 100644
--- a/libpurple/purplehistoryadapter.c
+++ b/libpurple/purplehistoryadapter.c
@@ -125,7 +125,7 @@ purple_history_adapter_finalize(GObject *obj) {
}
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(PurpleHistoryAdapter *adapter,
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
index 1524c1f5b2..d7c108e784 100644
--- 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
index 12c5451210..2bc81cec81 100644
--- a/libpurple/purpleimconversation.c
+++ b/libpurple/purpleimconversation.c
@@ -156,7 +156,7 @@ purple_im_conversation_set_property(GObject *obj, guint param_id,
}
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
index 7baa7fb744..fd4f942dcc 100644
--- a/libpurple/purplenoopcredentialprovider.c
+++ b/libpurple/purplenoopcredentialprovider.c
@@ -34,7 +34,7 @@ G_DEFINE_TYPE(PurpleNoopCredentialProvider, purple_noop_credential_provider,
*****************************************************************************/
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_password_async(PurpleCredentialProvider *pr
}
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_password_finish(PurpleCredentialProvider *p
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_password_async(PurpleCredentialProvider *p
}
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_password_finish(PurpleCredentialProvider *
* 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
index 2d027e4682..ae3311308b 100644
--- 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
index 1039c4e276..c4440ec9ec 100644
--- a/libpurple/purpleplugininfo.c
+++ b/libpurple/purpleplugininfo.c
@@ -94,7 +94,7 @@ purple_plugin_info_set_action_menu(PurplePluginInfo *info,
* 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
index 2fe6370936..f0ee2a76a6 100644
--- a/libpurple/purpleprotocol.c
+++ b/libpurple/purpleprotocol.c
@@ -259,7 +259,7 @@ purple_protocol_set_property(GObject *obj, guint param_id, const GValue *value,
}
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
index 366eed57a6..6d0aa9c100 100644
--- a/libpurple/purpleprotocolactions.c
+++ b/libpurple/purpleprotocolactions.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolActions, purple_protocol_actions,
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
index 794b927147..5e519fe96e 100644
--- a/libpurple/purpleprotocolchat.c
+++ b/libpurple/purpleprotocolchat.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolChat, purple_protocol_chat,
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
index f33b5ce4fa..6d60c0bc07 100644
--- a/libpurple/purpleprotocolclient.c
+++ b/libpurple/purpleprotocolclient.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolClient, purple_protocol_client,
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
index 7781b7a01e..f27d0cd6d8 100644
--- 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
index 88f3610a34..f9e8cd58f6 100644
--- a/libpurple/purpleprotocolmanager.c
+++ b/libpurple/purpleprotocolmanager.c
@@ -41,7 +41,7 @@ static PurpleProtocolManager *default_manager = NULL;
* 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
index a1b7cdd436..5e58458c3e 100644
--- a/libpurple/purpleprotocolmedia.c
+++ b/libpurple/purpleprotocolmedia.c
@@ -28,7 +28,8 @@ G_DEFINE_INTERFACE(PurpleProtocolMedia, purple_protocol_media,
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(PurpleProtocolMedia *media,
{
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
index 129272200b..653b081eb6 100644
--- a/libpurple/purpleprotocolroomlist.c
+++ b/libpurple/purpleprotocolroomlist.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolRoomlist, purple_protocol_roomlist,
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
index 8fab261b57..0353c16c8e 100644
--- a/libpurple/purpleprotocolserver.c
+++ b/libpurple/purpleprotocolserver.c
@@ -29,7 +29,8 @@ G_DEFINE_INTERFACE(PurpleProtocolServer, purple_protocol_server,
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
index 885b21e7d7..34206d99fd 100644
--- a/libpurple/purpleprotocolwhiteboard.c
+++ b/libpurple/purpleprotocolwhiteboard.c
@@ -29,7 +29,7 @@ G_DEFINE_INTERFACE(PurpleProtocolWhiteboard, purple_protocol_whiteboard,
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
index b452e864ee..e885e89c7e 100644
--- 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
index ad6c8942c7..12a55e9065 100644
--- a/libpurple/purplesqlitehistoryadapter.c
+++ b/libpurple/purplesqlitehistoryadapter.c
@@ -295,7 +295,7 @@ purple_sqlite_history_adapter_activate(PurpleHistoryAdapter *adapter,
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(GObject *obj) {
}
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
index 906152fca6..756640a20e 100644
--- 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
index 612aa8164a..5ee7ecd23e 100644
--- a/libpurple/purplewhiteboard.c
+++ b/libpurple/purplewhiteboard.c
@@ -143,7 +143,7 @@ purple_whiteboard_get_property(GObject *obj, guint param_id, GValue *value,
}
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
index bdc0ab4e48..7132f376ac 100644
--- a/libpurple/queuedoutputstream.c
+++ b/libpurple/queuedoutputstream.c
@@ -57,7 +57,7 @@ purple_queued_output_stream_push_bytes_async_cb(GObject *source,
/* 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
index 177fc07d01..42e674c45e 100644
--- a/libpurple/request.c
+++ b/libpurple/request.c
@@ -1889,7 +1889,7 @@ purple_request_field_datasheet_get_sheet(PurpleRequestField *field)
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(PurpleRequestInfo *info)
}
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
index 27ac79aedc..d530781bac 100644
--- a/libpurple/roomlist.c
+++ b/libpurple/roomlist.c
@@ -228,7 +228,7 @@ purple_roomlist_get_property(GObject *obj, guint param_id, GValue *value,
}
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
index 49d030704b..63f03dd559 100644
--- 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
index 02e1b0f76e..9733b85485 100644
--- a/libpurple/signals.c
+++ b/libpurple/signals.c
@@ -309,7 +309,7 @@ purple_signal_disconnect(void *instance, const char *signal,
* 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 char *signal,
}
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 cb, va_list args, void *data,
}
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(GCallback cb, va_list args,
((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_INT(GCallback cb, va_list args,
((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_POINTER(GCallback cb, va_list args,
}
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(GCallback cb, va_list args,
}
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_UINT(GCallback cb, va_list args,
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_UINT_UINT(GCallback cb, va_list args,
}
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(GCallback cb, va_list args,
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_POINTER(GCallback cb, va_list args,
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_POINTER_POINTER(GCallback cb,
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_POINTER_POINTER_POINTER(GCallback cb,
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_POINTER_UINT(GCallback cb,
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_POINTER_POINTER_UINT(GCallback cb,
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
index 5962c1bf43..ddf80b8284 100644
--- a/libpurple/status.c
+++ b/libpurple/status.c
@@ -1192,8 +1192,9 @@ purple_status_new(PurpleStatusType *status_type, PurplePresence *presence)
* 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
index 37410ac054..c5479a675f 100644
--- a/libpurple/stun.c
+++ b/libpurple/stun.c
@@ -136,7 +136,7 @@ static gboolean timeoutfunc(gpointer data) {
}
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
index 46d950b6cf..6c49ea434e 100644
--- 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_data, const char *filename)
}
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 *user_data, const char *filename)
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, guchar *buffer, gsize size)
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, purple_protocol_xfer,
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
index 929bf5e018..da5ce1c331 100644
--- 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_libxml(void *user_data,
}
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
index 7c0e4c1001..7de66990d9 100644
--- 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
index 94d7325332..14ec3c3e40 100644
--- a/purple-history/purplehistorycore.c
+++ b/purple-history/purplehistorycore.c
@@ -55,6 +55,7 @@ purple_history_query(const gchar *query, GError **error) {
return TRUE;
}
+G_GNUC_UNUSED
static gboolean
purple_history_remove(const gchar *query, GError **error) {
PurpleHistoryManager *manager = purple_history_manager_get_default();