Bump C standard to C99 for libpurple files and fix warnings
Testing Done:
Touched all source files and compiled; saw no new warnings.
Reviewed at https://reviews.imfreedom.org/r/2122/
--- a/libpurple/account.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/account.c Sun Dec 11 22:56:34 2022 -0600
@@ -271,7 +271,8 @@
-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 @@
/* 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, if(PURPLE_IS_PROTOCOL_SERVER(protocol)) {
purple_protocol_server_add_buddies(PURPLE_PROTOCOL_SERVER(protocol),
--- a/libpurple/accounts.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/accounts.c Sun Dec 11 22:56:34 2022 -0600
@@ -35,8 +35,9 @@
static gboolean accounts_loaded = FALSE;
-purple_accounts_network_changed_cb(GNetworkMonitor *m, gboolean available,
+purple_accounts_network_changed_cb(G_GNUC_UNUSED GNetworkMonitor *m, + G_GNUC_UNUSED gpointer data) purple_accounts_restore_current_statuses();
@@ -89,7 +90,7 @@
+save_cb(G_GNUC_UNUSED gpointer data) @@ -597,8 +598,7 @@
-signed_on_cb(PurpleConnection *gc,
+signed_on_cb(PurpleConnection *gc, G_GNUC_UNUSED gpointer unused) PurpleAccount *account = purple_connection_get_account(gc);
@@ -607,8 +607,7 @@
-signed_off_cb(PurpleConnection *gc,
+signed_off_cb(PurpleConnection *gc, G_GNUC_UNUSED gpointer unused) PurpleAccount *account = purple_connection_get_account(gc);
@@ -620,7 +619,7 @@
connection_error_cb(PurpleConnection *gc,
PurpleConnectionError type,
const gchar *description,
+ G_GNUC_UNUSED gpointer unused) PurpleConnectionErrorInfo *err;
--- a/libpurple/buddy.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/buddy.c Sun Dec 11 22:56:34 2022 -0600
@@ -159,7 +159,7 @@
-purple_buddy_init(PurpleBuddy *buddy) {
+purple_buddy_init(G_GNUC_UNUSED PurpleBuddy *buddy) { --- a/libpurple/buddyicon.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/buddyicon.c Sun Dec 11 22:56:34 2022 -0600
@@ -222,7 +222,7 @@
-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);
--- a/libpurple/buddylist.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/buddylist.c Sun Dec 11 22:56:34 2022 -0600
@@ -402,7 +402,7 @@
+save_cb(G_GNUC_UNUSED gpointer data) @@ -417,7 +417,8 @@
-purple_blist_real_save_account(PurpleBuddyList *list, PurpleAccount *account)
+purple_blist_real_save_account(G_GNUC_UNUSED PurpleBuddyList *list, + G_GNUC_UNUSED PurpleAccount *account) purple_blist_real_schedule_save();
@@ -431,7 +432,8 @@
-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 @@
-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 @@
return g_hash_table_lookup(priv->buddies, &hb);
-static void find_acct_buddies(gpointer key, gpointer value, gpointer data)
+find_acct_buddies(G_GNUC_UNUSED gpointer key, gpointer value, gpointer data) PurpleBuddy *buddy = value;
--- a/libpurple/chat.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/chat.c Sun Dec 11 22:56:34 2022 -0600
@@ -221,7 +221,7 @@
/* GObject initialization function */
-purple_chat_init(PurpleChat *chat)
+purple_chat_init(G_GNUC_UNUSED PurpleChat *chat) --- a/libpurple/circularbuffer.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/circularbuffer.c Sun Dec 11 22:56:34 2022 -0600
@@ -238,7 +238,7 @@
*****************************************************************************/
-purple_circular_buffer_init(PurpleCircularBuffer *buffer)
+purple_circular_buffer_init(G_GNUC_UNUSED PurpleCircularBuffer *buffer) --- a/libpurple/core.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/core.c Sun Dec 11 22:56:34 2022 -0600
@@ -297,7 +297,7 @@
-purple_core_quit_cb(gpointer unused)
+purple_core_quit_cb(G_GNUC_UNUSED gpointer unused) --- a/libpurple/countingnode.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/countingnode.c Sun Dec 11 22:56:34 2022 -0600
@@ -206,7 +206,7 @@
-purple_counting_node_init(PurpleCountingNode *counter)
+purple_counting_node_init(G_GNUC_UNUSED PurpleCountingNode *counter) --- a/libpurple/group.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/group.c Sun Dec 11 22:56:34 2022 -0600
@@ -292,7 +292,7 @@
/* GObject initialization function */
-purple_group_init(PurpleGroup *group) {
+purple_group_init(G_GNUC_UNUSED PurpleGroup *group) { /* Called when done constructing */
--- a/libpurple/idle.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/idle.c Sun Dec 11 22:56:34 2022 -0600
@@ -224,36 +224,38 @@
* Check idle and set the timer to fire at the next idle-worth event
-check_idleness_timer(void)
+check_idleness_timer(G_GNUC_UNUSED gpointer data) { - if (time_until_next_idle_event == 0)
+ if (time_until_next_idle_event == 0) {
* +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),
+ return G_SOURCE_REMOVE; -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 */
-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 */
-signing_off_cb(PurpleConnection *gc, void *data)
+signing_off_cb(PurpleConnection *gc, G_GNUC_UNUSED gpointer data) @@ -262,12 +264,14 @@
-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) g_source_remove(idle_timer);
- check_idleness_timer();
+ check_idleness_timer(NULL); @@ -279,7 +283,7 @@
g_source_remove(idle_timer);
- check_idleness_timer();
+ check_idleness_timer(NULL); @@ -310,12 +314,15 @@
-static gboolean _do_purple_idle_touch_cb(gpointer data)
+_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), --- a/libpurple/image-store.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/image-store.c Sun Dec 11 22:56:34 2022 -0600
@@ -121,7 +121,8 @@
-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));
--- a/libpurple/image.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/image.c Sun Dec 11 22:56:34 2022 -0600
@@ -72,7 +72,7 @@
******************************************************************************/
-purple_image_init(PurpleImage *image) {
+purple_image_init(G_GNUC_UNUSED PurpleImage *image) { --- a/libpurple/media.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/media.c Sun Dec 11 22:56:34 2022 -0600
@@ -475,7 +475,7 @@
-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_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_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 @@
/* callback called when a pair of transport candidates (local and remote)
* has been established */
-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_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 @@
-void purple_media_set_input_volume(PurpleMedia *media,
- const gchar *session_id, double level)
+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,
+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_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);
--- a/libpurple/media/candidate.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/media/candidate.c Sun Dec 11 22:56:34 2022 -0600
@@ -351,7 +351,9 @@
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, --- a/libpurple/media/codec.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/media/codec.c Sun Dec 11 22:56:34 2022 -0600
@@ -345,7 +345,9 @@
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, --- a/libpurple/mediamanager.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/mediamanager.c Sun Dec 11 22:56:34 2022 -0600
@@ -227,7 +227,8 @@
-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)) {
@@ -553,7 +554,8 @@
-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);
@@ -578,7 +580,8 @@
-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 @@
-appsrc_need_data (GstAppSrc *appsrc, guint length, gpointer user_data)
+appsrc_need_data(G_GNUC_UNUSED GstAppSrc *appsrc, G_GNUC_UNUSED guint length, PurpleMediaAppDataInfo *info = user_data;
PurpleMediaManager *manager = purple_media_manager_get ();
@@ -729,7 +733,7 @@
-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_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) @@ -770,9 +775,12 @@
-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 @@
-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 @@
-appsink_eos (GstAppSink *appsink, gpointer user_data)
+appsink_eos(G_GNUC_UNUSED GstAppSink *appsink, + G_GNUC_UNUSED gpointer user_data) -appsink_new_preroll (GstAppSink *appsink, gpointer user_data)
+appsink_new_preroll(G_GNUC_UNUSED GstAppSink *appsink, + G_GNUC_UNUSED gpointer user_data) @@ -904,7 +915,7 @@
-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 @@
-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_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) @@ -1905,7 +1919,8 @@
-device_monitor_bus_cb(GstBus *bus, GstMessage *message, gpointer user_data)
+device_monitor_bus_cb(G_GNUC_UNUSED GstBus *bus, GstMessage *message, PurpleMediaManager *manager = user_data;
GstMessageType message_type;
@@ -1973,8 +1988,10 @@
-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) @@ -1989,15 +2006,18 @@
-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));
-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 @@
-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 @@
-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);
--- a/libpurple/meson.build Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/meson.build Sun Dec 11 22:56:34 2022 -0600
@@ -322,7 +322,8 @@
dependencies : # static_link_libs
[dnsapi, ws2_32, glib, gio, gplugin_dep, libsoup,
libxml, gdk_pixbuf, gstreamer, gstreamer_app, json,
+ override_options : ['c_std=c99', 'warning_level=2']) install_headers(purple_coreheaders,
subdir : purple_include_base)
--- a/libpurple/nat-pmp.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/nat-pmp.c Sun Dec 11 22:56:34 2022 -0600
@@ -544,13 +544,17 @@
-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) -purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport)
+purple_pmp_destroy_map(G_GNUC_UNUSED PurplePmpType type, + G_GNUC_UNUSED unsigned short privateport) --- a/libpurple/notify.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/notify.c Sun Dec 11 22:56:34 2022 -0600
@@ -679,7 +679,7 @@
-purple_notify_close(PurpleNotifyType type, void *ui_handle)
+purple_notify_close(G_GNUC_UNUSED PurpleNotifyType type, void *ui_handle) --- a/libpurple/plugins.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/plugins.c Sun Dec 11 22:56:34 2022 -0600
@@ -46,8 +46,8 @@
**************************************************************************/
-plugin_loading_cb(GObject *manager, PurplePlugin *plugin, GError **error,
+plugin_loading_cb(G_GNUC_UNUSED GObject *manager, PurplePlugin *plugin, + GError **error, G_GNUC_UNUSED gpointer data) const gchar *info_error = NULL;
@@ -76,7 +76,7 @@
-plugin_loaded_cb(GObject *manager, PurplePlugin *plugin)
+plugin_loaded_cb(G_GNUC_UNUSED GObject *manager, PurplePlugin *plugin) @@ -96,8 +96,8 @@
-plugin_unloading_cb(GObject *manager, PurplePlugin *plugin, GError **error,
+plugin_unloading_cb(G_GNUC_UNUSED GObject *manager, PurplePlugin *plugin, + G_GNUC_UNUSED GError **error, G_GNUC_UNUSED gpointer data) @@ -116,7 +116,7 @@
-plugin_unloaded_cb(GObject *manager, PurplePlugin *plugin)
+plugin_unloaded_cb(G_GNUC_UNUSED GObject *manager, PurplePlugin *plugin) @@ -254,7 +254,7 @@
-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.
--- a/libpurple/prefs.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/prefs.c Sun Dec 11 22:56:34 2022 -0600
@@ -230,7 +230,7 @@
+save_cb(G_GNUC_UNUSED gpointer data) @@ -252,12 +252,12 @@
static GList *prefs_stack = NULL;
-prefs_start_element_handler (GMarkupParseContext *context,
- const gchar *element_name,
- const gchar **attribute_names,
- const gchar **attribute_values,
+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;
@@ -370,9 +370,10 @@
-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 @@
-prefs_save_cb(const char *name, PurplePrefType type, gconstpointer val,
+prefs_save_cb(const char *name, G_GNUC_UNUSED PurplePrefType type, + G_GNUC_UNUSED gconstpointer val, + G_GNUC_UNUSED gpointer user_data) @@ -700,14 +700,15 @@
purple_prefs_add_path_list(const char *name, GList *value)
struct purple_pref *pref;
pref = add_pref(PURPLE_PREF_PATH_LIST, name);
- 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); @@ -982,7 +983,9 @@
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, do_callbacks(name, pref);
@@ -1095,7 +1098,8 @@
- 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); @@ -1135,7 +1139,8 @@
- 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); --- a/libpurple/protocols.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/protocols.c Sun Dec 11 22:56:34 2022 -0600
@@ -271,7 +271,8 @@
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;
--- a/libpurple/proxy.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/proxy.c Sun Dec 11 22:56:34 2022 -0600
@@ -225,8 +225,8 @@
-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();
--- a/libpurple/purpleaccountpresence.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleaccountpresence.c Sun Dec 11 22:56:34 2022 -0600
@@ -55,7 +55,8 @@
* PurplePresence Implementation
*****************************************************************************/
-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_init(PurpleAccountPresence *presence) {
+purple_account_presence_init(G_GNUC_UNUSED PurpleAccountPresence *presence) { --- a/libpurple/purpleaddcontactrequest.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleaddcontactrequest.c Sun Dec 11 22:56:34 2022 -0600
@@ -160,7 +160,8 @@
-purple_add_contact_request_init(PurpleAddContactRequest *request) {
+purple_add_contact_request_init(G_GNUC_UNUSED PurpleAddContactRequest *request) --- a/libpurple/purpleattachment.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleattachment.c Sun Dec 11 22:56:34 2022 -0600
@@ -134,7 +134,7 @@
-purple_attachment_init(PurpleAttachment *attachment) {
+purple_attachment_init(G_GNUC_UNUSED PurpleAttachment *attachment) { --- a/libpurple/purpleauthorizationrequest.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleauthorizationrequest.c Sun Dec 11 22:56:34 2022 -0600
@@ -171,7 +171,8 @@
-purple_authorization_request_init(PurpleAuthorizationRequest *request) {
+purple_authorization_request_init(G_GNUC_UNUSED PurpleAuthorizationRequest *request) --- a/libpurple/purplebuddypresence.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purplebuddypresence.c Sun Dec 11 22:56:34 2022 -0600
@@ -225,7 +225,7 @@
-purple_buddy_presence_init(PurpleBuddyPresence *presence) {
+purple_buddy_presence_init(G_GNUC_UNUSED PurpleBuddyPresence *presence) { --- a/libpurple/purplecontact.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purplecontact.c Sun Dec 11 22:56:34 2022 -0600
@@ -94,7 +94,7 @@
-purple_contact_init(PurpleContact *contact) {
+purple_contact_init(G_GNUC_UNUSED PurpleContact *contact) { --- a/libpurple/purplecontactmanager.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purplecontactmanager.c Sun Dec 11 22:56:34 2022 -0600
@@ -71,10 +71,10 @@
-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,
+ 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_avatar_to_icon(GBinding *binding,
+purple_contact_manager_convert_avatar_to_icon(G_GNUC_UNUSED GBinding *binding, const GValue *from_value,
+ G_GNUC_UNUSED gpointer user_data) PurpleBuddyIcon *icon = NULL;
GdkPixbuf *avatar = g_value_get_object(from_value);
--- a/libpurple/purpleconversation.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleconversation.c Sun Dec 11 22:56:34 2022 -0600
@@ -264,7 +264,7 @@
-purple_conversation_init(PurpleConversation *conv) {
+purple_conversation_init(G_GNUC_UNUSED PurpleConversation *conv) { --- a/libpurple/purplecredentialprovider.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purplecredentialprovider.c Sun Dec 11 22:56:34 2022 -0600
@@ -152,7 +152,8 @@
-purple_credential_provider_init(PurpleCredentialProvider *provider) {
+purple_credential_provider_init(G_GNUC_UNUSED PurpleCredentialProvider *provider) --- a/libpurple/purpledebugui.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpledebugui.c Sun Dec 11 22:56:34 2022 -0600
@@ -59,6 +59,6 @@
G_DEFINE_INTERFACE(PurpleDebugUi, purple_debug_ui, G_TYPE_OBJECT);
-purple_debug_ui_default_init(PurpleDebugUiInterface *iface) {
+purple_debug_ui_default_init(G_GNUC_UNUSED PurpleDebugUiInterface *iface) { --- a/libpurple/purplehistoryadapter.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purplehistoryadapter.c Sun Dec 11 22:56:34 2022 -0600
@@ -125,7 +125,7 @@
-purple_history_adapter_init(PurpleHistoryAdapter *adapter) {
+purple_history_adapter_init(G_GNUC_UNUSED PurpleHistoryAdapter *adapter) { @@ -298,4 +298,4 @@
G_OBJECT_TYPE_NAME(G_OBJECT(adapter)));
\ No newline at end of file
--- a/libpurple/purpleidleui.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleidleui.c Sun Dec 11 22:56:34 2022 -0600
@@ -24,7 +24,7 @@
G_DEFINE_INTERFACE(PurpleIdleUi, purple_idle_ui, G_TYPE_INVALID)
-purple_idle_ui_default_init(PurpleIdleUiInterface *iface) {
+purple_idle_ui_default_init(G_GNUC_UNUSED PurpleIdleUiInterface *iface) { /******************************************************************************
--- a/libpurple/purpleimconversation.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleimconversation.c Sun Dec 11 22:56:34 2022 -0600
@@ -156,7 +156,7 @@
-purple_im_conversation_init(PurpleIMConversation *im) {
+purple_im_conversation_init(G_GNUC_UNUSED PurpleIMConversation *im) { --- a/libpurple/purplenoopcredentialprovider.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purplenoopcredentialprovider.c Sun Dec 11 22:56:34 2022 -0600
@@ -34,7 +34,7 @@
*****************************************************************************/
purple_noop_credential_provider_read_password_async(PurpleCredentialProvider *provider,
- PurpleAccount *account,
+ G_GNUC_UNUSED PurpleAccount *account, GCancellable *cancellable,
GAsyncReadyCallback callback,
@@ -48,7 +48,7 @@
-purple_noop_credential_provider_read_password_finish(PurpleCredentialProvider *provider,
+purple_noop_credential_provider_read_password_finish(G_GNUC_UNUSED PurpleCredentialProvider *provider, @@ -57,8 +57,8 @@
purple_noop_credential_provider_write_password_async(PurpleCredentialProvider *provider,
- PurpleAccount *account,
+ G_GNUC_UNUSED PurpleAccount *account, + G_GNUC_UNUSED const char *password, GCancellable *cancellable,
GAsyncReadyCallback callback,
@@ -72,7 +72,7 @@
-purple_noop_credential_provider_write_password_finish(PurpleCredentialProvider *provider,
+purple_noop_credential_provider_write_password_finish(G_GNUC_UNUSED PurpleCredentialProvider *provider, @@ -83,7 +83,8 @@
*****************************************************************************/
-purple_noop_credential_provider_init(PurpleNoopCredentialProvider *provider) {
+purple_noop_credential_provider_init(G_GNUC_UNUSED PurpleNoopCredentialProvider *provider) --- a/libpurple/purpleoptions.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleoptions.c Sun Dec 11 22:56:34 2022 -0600
@@ -32,8 +32,10 @@
*****************************************************************************/
-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();
--- a/libpurple/purpleplugininfo.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleplugininfo.c Sun Dec 11 22:56:34 2022 -0600
@@ -94,7 +94,7 @@
**************************************************************************/
-purple_plugin_info_init(PurplePluginInfo *info) {
+purple_plugin_info_init(G_GNUC_UNUSED PurplePluginInfo *info) { --- a/libpurple/purpleprotocol.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocol.c Sun Dec 11 22:56:34 2022 -0600
@@ -259,7 +259,7 @@
-purple_protocol_init(PurpleProtocol *protocol) {
+purple_protocol_init(G_GNUC_UNUSED PurpleProtocol *protocol) { --- a/libpurple/purpleprotocolactions.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolactions.c Sun Dec 11 22:56:34 2022 -0600
@@ -29,7 +29,8 @@
-purple_protocol_actions_default_init(PurpleProtocolActionsInterface *iface) {
+purple_protocol_actions_default_init(G_GNUC_UNUSED PurpleProtocolActionsInterface *iface) /******************************************************************************
--- a/libpurple/purpleprotocolchat.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolchat.c Sun Dec 11 22:56:34 2022 -0600
@@ -29,7 +29,8 @@
-purple_protocol_chat_default_init(PurpleProtocolChatInterface *iface) {
+purple_protocol_chat_default_init(G_GNUC_UNUSED PurpleProtocolChatInterface *iface) /******************************************************************************
--- a/libpurple/purpleprotocolclient.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolclient.c Sun Dec 11 22:56:34 2022 -0600
@@ -29,7 +29,8 @@
-purple_protocol_client_default_init(PurpleProtocolClientInterface *iface) {
+purple_protocol_client_default_init(G_GNUC_UNUSED PurpleProtocolClientInterface *iface) /******************************************************************************
--- a/libpurple/purpleprotocolim.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolim.c Sun Dec 11 22:56:34 2022 -0600
@@ -27,7 +27,8 @@
G_DEFINE_INTERFACE(PurpleProtocolIM, purple_protocol_im, PURPLE_TYPE_PROTOCOL)
-purple_protocol_im_default_init(PurpleProtocolIMInterface *iface) {
+purple_protocol_im_default_init(G_GNUC_UNUSED PurpleProtocolIMInterface *iface) /******************************************************************************
--- a/libpurple/purpleprotocolmanager.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolmanager.c Sun Dec 11 22:56:34 2022 -0600
@@ -41,7 +41,7 @@
* GListModel Implementation
*****************************************************************************/
-purple_protocol_manager_get_item_type(GListModel *list) {
+purple_protocol_manager_get_item_type(G_GNUC_UNUSED GListModel *list) { return PURPLE_TYPE_PROTOCOL;
--- a/libpurple/purpleprotocolmedia.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolmedia.c Sun Dec 11 22:56:34 2022 -0600
@@ -28,7 +28,8 @@
-purple_protocol_media_default_init(PurpleProtocolMediaInterface *iface) {
+purple_protocol_media_default_init(G_GNUC_UNUSED PurpleProtocolMediaInterface *iface) /******************************************************************************
@@ -58,14 +59,15 @@
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; --- a/libpurple/purpleprotocolroomlist.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolroomlist.c Sun Dec 11 22:56:34 2022 -0600
@@ -29,7 +29,8 @@
-purple_protocol_roomlist_default_init(PurpleProtocolRoomlistInterface *iface) {
+purple_protocol_roomlist_default_init(G_GNUC_UNUSED PurpleProtocolRoomlistInterface *iface) /******************************************************************************
--- a/libpurple/purpleprotocolserver.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolserver.c Sun Dec 11 22:56:34 2022 -0600
@@ -29,7 +29,8 @@
-purple_protocol_server_default_init(PurpleProtocolServerInterface *iface) {
+purple_protocol_server_default_init(G_GNUC_UNUSED PurpleProtocolServerInterface *iface) /******************************************************************************
--- a/libpurple/purpleprotocolwhiteboard.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleprotocolwhiteboard.c Sun Dec 11 22:56:34 2022 -0600
@@ -29,7 +29,7 @@
-purple_protocol_whiteboard_default_init(PurpleProtocolWhiteboardInterface *iface)
+purple_protocol_whiteboard_default_init(G_GNUC_UNUSED PurpleProtocolWhiteboardInterface *iface) --- a/libpurple/purpleproxyinfo.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpleproxyinfo.c Sun Dec 11 22:56:34 2022 -0600
@@ -114,7 +114,7 @@
-purple_proxy_info_init(PurpleProxyInfo *info) {
+purple_proxy_info_init(G_GNUC_UNUSED PurpleProxyInfo *info) { --- a/libpurple/purplesqlitehistoryadapter.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purplesqlitehistoryadapter.c Sun Dec 11 22:56:34 2022 -0600
@@ -295,7 +295,7 @@
purple_sqlite_history_adapter_deactivate(PurpleHistoryAdapter *adapter,
+ G_GNUC_UNUSED GError **error) PurpleSqliteHistoryAdapter *sqlite_adapter = NULL;
@@ -570,7 +570,8 @@
-purple_sqlite_history_adapter_init(PurpleSqliteHistoryAdapter *adapter) {
+purple_sqlite_history_adapter_init(G_GNUC_UNUSED PurpleSqliteHistoryAdapter *adapter) --- a/libpurple/purpletags.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purpletags.c Sun Dec 11 22:56:34 2022 -0600
@@ -49,7 +49,7 @@
-purple_tags_init(PurpleTags *tags) {
+purple_tags_init(G_GNUC_UNUSED PurpleTags *tags) { --- a/libpurple/purplewhiteboard.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/purplewhiteboard.c Sun Dec 11 22:56:34 2022 -0600
@@ -143,7 +143,7 @@
-purple_whiteboard_init(PurpleWhiteboard *whiteboard) {
+purple_whiteboard_init(G_GNUC_UNUSED PurpleWhiteboard *whiteboard) { --- a/libpurple/queuedoutputstream.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/queuedoutputstream.c Sun Dec 11 22:56:34 2022 -0600
@@ -57,7 +57,7 @@
/* Error occurred, return error */
g_task_return_error(task, error);
- } 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);
--- a/libpurple/request.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/request.c Sun Dec 11 22:56:34 2022 -0600
@@ -1889,7 +1889,7 @@
purple_request_field_email_validator(PurpleRequestField *field, gchar **errmsg,
+ G_GNUC_UNUSED gpointer user_data) @@ -2418,7 +2418,7 @@
-purple_request_close(PurpleRequestType type, void *ui_handle)
+purple_request_close(G_GNUC_UNUSED PurpleRequestType type, void *ui_handle) --- a/libpurple/roomlist.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/roomlist.c Sun Dec 11 22:56:34 2022 -0600
@@ -228,7 +228,7 @@
-purple_roomlist_init(PurpleRoomlist *list)
+purple_roomlist_init(G_GNUC_UNUSED PurpleRoomlist *list) --- a/libpurple/savedstatuses.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/savedstatuses.c Sun Dec 11 22:56:34 2022 -0600
@@ -343,7 +343,7 @@
+save_cb(G_GNUC_UNUSED gpointer data) --- a/libpurple/signals.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/signals.c Sun Dec 11 22:56:34 2022 -0600
@@ -309,7 +309,7 @@
-disconnect_handle_from_signals(const char *signal,
+disconnect_handle_from_signals(G_GNUC_UNUSED const char *signal, PurpleSignalData *signal_data, void *handle)
@@ -332,7 +332,7 @@
-disconnect_handle_from_instance(void *instance,
+disconnect_handle_from_instance(G_GNUC_UNUSED gpointer instance, PurpleInstanceData *instance_data,
@@ -483,15 +483,15 @@
**************************************************************************/
-purple_marshal_VOID(GCallback cb, va_list args, void *data,
+purple_marshal_VOID(GCallback cb, G_GNUC_UNUSED va_list args, void *data, + G_GNUC_UNUSED void **return_val) ((void (*)(void *))cb)(data);
purple_marshal_VOID__POINTER(GCallback cb, va_list args, void *data,
+ G_GNUC_UNUSED void **return_val) void *arg1 = va_arg(args, void *);
@@ -499,8 +499,8 @@
-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 @@
((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)
+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 (*)(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)
+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 @@
-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_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_UINT(GCallback cb, va_list args,
- void *data, void **return_val)
+ 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_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_POINTER_POINTER(GCallback cb, va_list args,
- void *data, void **return_val)
+ 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_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 *);
@@ -599,9 +602,9 @@
purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER(GCallback cb,
+ 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_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 *);
@@ -628,9 +630,9 @@
purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT(GCallback cb,
+ 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_UINT_UINT(GCallback cb,
+ G_GNUC_UNUSED void **return_val) void *arg1 = va_arg(args, void *);
void *arg2 = va_arg(args, void *);
--- a/libpurple/status.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/status.c Sun Dec 11 22:56:34 2022 -0600
@@ -1192,8 +1192,9 @@
**************************************************************************/
-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, int index = GPOINTER_TO_INT(data);
--- a/libpurple/stun.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/stun.c Sun Dec 11 22:56:34 2022 -0600
@@ -136,7 +136,7 @@
-reply_cb(GSocket *socket, GIOCondition condition, gpointer data)
+reply_cb(GSocket *socket, G_GNUC_UNUSED GIOCondition condition, gpointer data) struct stun_conn *sc = data;
--- a/libpurple/xfer.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/xfer.c Sun Dec 11 22:56:34 2022 -0600
@@ -147,7 +147,7 @@
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); purple_xfer_status_type_to_string(PurpleXferStatus type)
@@ -403,7 +403,8 @@
-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(PurpleXfer *xfer)
purple_request_file(xfer, NULL, purple_xfer_get_filename(xfer),
@@ -424,8 +425,6 @@
G_CALLBACK(purple_xfer_choose_file_cancel_cb),
purple_request_cpar_from_account(purple_xfer_get_account(xfer)),
@@ -1313,7 +1312,7 @@
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);
@@ -1482,7 +1481,8 @@
-transfer_cb(gpointer data, gint source, PurpleInputCondition condition)
+transfer_cb(gpointer data, G_GNUC_UNUSED gint source, + G_GNUC_UNUSED PurpleInputCondition condition) PurpleXferPrivate *priv = purple_xfer_get_instance_private(xfer);
@@ -2534,7 +2534,8 @@
-purple_protocol_xfer_default_init(PurpleProtocolXferInterface *face) {
+purple_protocol_xfer_default_init(G_GNUC_UNUSED PurpleProtocolXferInterface *face) --- a/libpurple/xmlnode.c Sun Dec 11 22:49:27 2022 -0600
+++ b/libpurple/xmlnode.c Sun Dec 11 22:56:34 2022 -0600
@@ -634,10 +634,15 @@
-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 **namespaces, + G_GNUC_UNUSED int nb_defaulted, + const xmlChar **attributes) struct _xmlnode_parser_data *xpd = user_data;
@@ -685,8 +690,10 @@
-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;
--- a/purple-history/meson.build Sun Dec 11 22:49:27 2022 -0600
+++ b/purple-history/meson.build Sun Dec 11 22:56:34 2022 -0600
@@ -5,5 +5,5 @@
purple_history = executable('purple-history',
dependencies : [libpurple_dep, glib],
+ override_options : ['c_std=c99', 'warning_level=2']) --- a/purple-history/purplehistorycore.c Sun Dec 11 22:49:27 2022 -0600
+++ b/purple-history/purplehistorycore.c Sun Dec 11 22:56:34 2022 -0600
@@ -55,6 +55,7 @@
purple_history_remove(const gchar *query, GError **error) {
PurpleHistoryManager *manager = purple_history_manager_get_default();