pidgin/pidgin

58ae70ad7f21
Parents 31532581724a
Children 9777f0b39e17
Mark unused parameters as such for all of the pidgin plugins

Testing Done:
Turned the warning level up to 2, compiled, and verified the warnings were gone.

Reviewed at https://reviews.imfreedom.org/r/2252/
--- a/pidgin/plugins/disco/gtkdisco.c Tue Feb 21 21:43:14 2023 -0600
+++ b/pidgin/plugins/disco/gtkdisco.c Tue Feb 21 22:06:47 2023 -0600
@@ -131,8 +131,8 @@
xmpp_disco_register_service(service);
}
-static void discolist_cancel_cb(PidginDiscoList *pdl, const char *server)
-{
+static void
+discolist_cancel_cb(PidginDiscoList *pdl, G_GNUC_UNUSED const char *server) {
pdl->dialog->prompt_handle = NULL;
pidgin_disco_list_set_in_progress(pdl, FALSE);
@@ -311,8 +311,8 @@
}
static void
-row_expanded_cb(GtkTreeView *tree, GtkTreeIter *arg1, GtkTreePath *rg2,
- gpointer user_data)
+row_expanded_cb(G_GNUC_UNUSED GtkTreeView *tree, GtkTreeIter *arg1,
+ G_GNUC_UNUSED GtkTreePath *rg2, gpointer user_data)
{
PidginDiscoDialog *dialog = user_data;
XmppDiscoService *service;
@@ -326,10 +326,10 @@
}
static void
-row_activated_cb(GtkTreeView *tree_view,
- GtkTreePath *path,
- GtkTreeViewColumn *column,
- gpointer user_data)
+row_activated_cb(G_GNUC_UNUSED GtkTreeView *tree_view,
+ GtkTreePath *path,
+ G_GNUC_UNUSED GtkTreeViewColumn *column,
+ gpointer user_data)
{
PidginDiscoDialog *dialog = user_data;
GtkTreeIter iter;
@@ -567,7 +567,7 @@
}
static void
-pidgin_disco_dialog_class_finalize(PidginDiscoDialogClass *klass)
+pidgin_disco_dialog_class_finalize(G_GNUC_UNUSED PidginDiscoDialogClass *klass)
{
}
--- a/pidgin/plugins/disco/xmppdisco.c Tue Feb 21 21:43:14 2023 -0600
+++ b/pidgin/plugins/disco/xmppdisco.c Tue Feb 21 22:06:47 2023 -0600
@@ -93,7 +93,8 @@
}
static gboolean
-remove_iq_callbacks_by_pc(gpointer key, gpointer value, gpointer user_data)
+remove_iq_callbacks_by_pc(G_GNUC_UNUSED gpointer key, gpointer value,
+ gpointer user_data)
{
struct xmpp_iq_cb_data *cb_data = value;
@@ -281,8 +282,9 @@
}
static void
-got_info_cb(PurpleConnection *pc, const char *type, const char *id,
- const char *from, PurpleXmlNode *iq, gpointer data)
+got_info_cb(G_GNUC_UNUSED PurpleConnection *pc, const char *type,
+ G_GNUC_UNUSED const char *id, const char *from, PurpleXmlNode *iq,
+ gpointer data)
{
struct item_data *item_data = data;
PidginDiscoList *list = item_data->list;
@@ -378,8 +380,9 @@
}
static void
-got_items_cb(PurpleConnection *pc, const char *type, const char *id,
- const char *from, PurpleXmlNode *iq, gpointer data)
+got_items_cb(PurpleConnection *pc, const char *type,
+ G_GNUC_UNUSED const char *id, G_GNUC_UNUSED const char *from,
+ PurpleXmlNode *iq, gpointer data)
{
struct item_data *item_data = data;
PidginDiscoList *list = item_data->list;
@@ -454,8 +457,10 @@
}
static void
-server_items_cb(PurpleConnection *pc, const char *type, const char *id,
- const char *from, PurpleXmlNode *iq, gpointer data)
+server_items_cb(PurpleConnection *pc, const char *type,
+ G_GNUC_UNUSED const char *id,
+ G_GNUC_UNUSED const char *from, PurpleXmlNode *iq,
+ gpointer data)
{
struct item_data *cb_data = data;
PidginDiscoList *list = cb_data->list;
@@ -498,7 +503,8 @@
}
static void
-server_info_cb(PurpleConnection *pc, const char *type, const char *id,
+server_info_cb(PurpleConnection *pc, const char *type,
+ G_GNUC_UNUSED const char *id,
const char *from, PurpleXmlNode *iq, gpointer data)
{
struct item_data *cb_data = data;
@@ -628,7 +634,7 @@
}
static void
-signed_off_cb(PurpleConnection *pc, gpointer unused)
+signed_off_cb(PurpleConnection *pc, G_GNUC_UNUSED gpointer data)
{
/* Deal with any dialogs */
pidgin_disco_signed_off_cb(pc);
@@ -638,7 +644,7 @@
}
static GPluginPluginInfo *
-xmpp_disco_query(GError **error)
+xmpp_disco_query(G_GNUC_UNUSED GError **error)
{
GActionEntry entries[] = {
{
@@ -705,7 +711,8 @@
}
static gboolean
-xmpp_disco_unload(GPluginPlugin *plugin, gboolean unload, GError **error)
+xmpp_disco_unload(GPluginPlugin *plugin, G_GNUC_UNUSED gboolean unload,
+ G_GNUC_UNUSED GError **error)
{
g_hash_table_destroy(iq_callbacks);
iq_callbacks = NULL;
--- a/pidgin/plugins/iconaway/iconaway.c Tue Feb 21 21:43:14 2023 -0600
+++ b/pidgin/plugins/iconaway/iconaway.c Tue Feb 21 22:06:47 2023 -0600
@@ -27,7 +27,9 @@
#define ICONAWAY_PLUGIN_ID "gtk-iconaway"
static void
-iconify_windows(PurpleAccount *account, PurpleStatus *old, PurpleStatus *newstatus)
+iconify_windows(G_GNUC_UNUSED PurpleAccount *account,
+ G_GNUC_UNUSED PurpleStatus *old,
+ PurpleStatus *newstatus)
{
GApplication *application = NULL;
PurplePresence *presence;
@@ -51,7 +53,7 @@
*/
static GPluginPluginInfo *
-icon_away_query(GError **error)
+icon_away_query(G_GNUC_UNUSED GError **error)
{
const gchar * const authors[] = {
"Eric Warmenhoven <eric@warmenhoven.org>",
@@ -75,7 +77,7 @@
}
static gboolean
-icon_away_load(GPluginPlugin *plugin, GError **error)
+icon_away_load(GPluginPlugin *plugin, G_GNUC_UNUSED GError **error)
{
purple_signal_connect(purple_accounts_get_handle(), "account-status-changed",
plugin, G_CALLBACK(iconify_windows), NULL);
@@ -84,7 +86,9 @@
}
static gboolean
-icon_away_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error)
+icon_away_unload(G_GNUC_UNUSED GPluginPlugin *plugin,
+ G_GNUC_UNUSED gboolean shutdown,
+ G_GNUC_UNUSED GError **error)
{
return TRUE;
}
--- a/pidgin/plugins/transparency/transparency.c Tue Feb 21 21:43:14 2023 -0600
+++ b/pidgin/plugins/transparency/transparency.c Tue Feb 21 22:06:47 2023 -0600
@@ -339,7 +339,7 @@
add_focus_controller_to_conv_win(GTK_WIDGET(window));
}
-static void alpha_change(GtkWidget *w, gpointer data) {
+static void alpha_change(GtkWidget *w, G_GNUC_UNUSED gpointer data) {
GApplication *application = NULL;
GList *wins;
int imalpha = gtk_range_get_value(GTK_RANGE(w));
@@ -392,7 +392,7 @@
}
static GtkWidget *
-get_config_frame(PurplePlugin *plugin) {
+get_config_frame(G_GNUC_UNUSED PurplePlugin *plugin) {
GtkWidget *ret;
GtkWidget *imtransbox;
GtkWidget *hbox;
@@ -470,7 +470,7 @@
}
static GPluginPluginInfo *
-transparency_query(GError **error) {
+transparency_query(G_GNUC_UNUSED GError **error) {
const gchar * const authors[] = {
"Pidgin Developers <devel@pidgin.im>",
NULL
@@ -492,7 +492,9 @@
}
static gboolean
-transparency_load(GPluginPlugin *plugin, GError **error) {
+transparency_load(G_GNUC_UNUSED GPluginPlugin *plugin,
+ G_GNUC_UNUSED GError **error)
+{
GApplication *application = NULL;
application = g_application_get_default();
@@ -507,7 +509,10 @@
}
static gboolean
-transparency_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error) {
+transparency_unload(G_GNUC_UNUSED GPluginPlugin *plugin,
+ G_GNUC_UNUSED gboolean shutdown,
+ G_GNUC_UNUSED GError **error)
+{
purple_debug_info(WINTRANS_PLUGIN_ID, "Unloading transparency plugin\n");
remove_convs_wintrans(TRUE);
--- a/pidgin/plugins/unity/unity.c Tue Feb 21 21:43:14 2023 -0600
+++ b/pidgin/plugins/unity/unity.c Tue Feb 21 22:06:47 2023 -0600
@@ -200,14 +200,16 @@
}
static int
-unalert_cb(GtkWidget *widget, gpointer data, PurpleConversation *conv)
+unalert_cb(G_GNUC_UNUSED GtkWidget *widget, G_GNUC_UNUSED gpointer data,
+ PurpleConversation *conv)
{
unalert(conv);
return 0;
}
static gboolean
-message_displayed_cb(PurpleConversation *conv, PurpleMessage *msg, gpointer _unused)
+message_displayed_cb(PurpleConversation *conv, PurpleMessage *msg,
+ G_GNUC_UNUSED gpointer data)
{
PurpleMessageFlags flags = purple_message_get_flags(msg);
@@ -222,7 +224,8 @@
}
static void
-im_sent_im(PurpleAccount *account, PurpleMessage *msg, gpointer _unused)
+im_sent_im(PurpleAccount *account, PurpleMessage *msg,
+ G_GNUC_UNUSED gpointer data)
{
PurpleConversation *im = NULL;
PurpleConversationManager *manager = NULL;
@@ -236,7 +239,7 @@
}
static void
-chat_sent_im(PurpleAccount *account, PurpleMessage *msg, int id)
+chat_sent_im(PurpleAccount *account, G_GNUC_UNUSED PurpleMessage *msg, int id)
{
PurpleConversation *chat = NULL;
PurpleConversationManager *manager = NULL;
@@ -264,8 +267,9 @@
}
static void
-message_source_activated(MessagingMenuApp *app, const gchar *id,
- gpointer user_data)
+message_source_activated(G_GNUC_UNUSED MessagingMenuApp *app,
+ const gchar *id,
+ G_GNUC_UNUSED gpointer user_data)
{
gchar **sections = g_strsplit(id, ":", 0);
PurpleConversation *conv = NULL;
@@ -376,8 +380,9 @@
}
static void
-messaging_menu_status_changed(MessagingMenuApp *mmapp,
- MessagingMenuStatus mm_status, gpointer user_data)
+messaging_menu_status_changed(G_GNUC_UNUSED MessagingMenuApp *mmapp,
+ MessagingMenuStatus mm_status,
+ G_GNUC_UNUSED gpointer user_data)
{
PurpleSavedStatus *saved_status;
PurpleStatusPrimitive primitive = PURPLE_STATUS_UNSET;
@@ -414,7 +419,7 @@
}
static void
-alert_config_cb(GtkWidget *widget, gpointer data)
+alert_config_cb(GtkWidget *widget, G_GNUC_UNUSED gpointer data)
{
gboolean on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
purple_prefs_set_bool("/plugins/gtk/unity/alert_chat_nick", on);
@@ -489,7 +494,7 @@
}
static GtkWidget *
-get_config_frame(PurplePlugin *plugin)
+get_config_frame(G_GNUC_UNUSED PurplePlugin *plugin)
{
GtkWidget *ret = NULL, *frame = NULL;
GtkWidget *vbox = NULL, *toggle = NULL, *group = NULL;
@@ -572,7 +577,7 @@
}
static GPluginPluginInfo *
-unity_query(GError **error)
+unity_query(G_GNUC_UNUSED GError **error)
{
const gchar * const authors[] = {
"Ankit Vani <a@nevitus.org>",
@@ -596,7 +601,7 @@
}
static gboolean
-unity_load(GPluginPlugin *plugin, GError **error) {
+unity_load(GPluginPlugin *plugin, G_GNUC_UNUSED GError **error) {
GList *convs = NULL;
PurpleConversationManager *manager = NULL;
PurpleSavedStatus *saved_status;
@@ -657,7 +662,10 @@
}
static gboolean
-unity_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error) {
+unity_unload(G_GNUC_UNUSED GPluginPlugin *plugin,
+ G_GNUC_UNUSED gboolean shutdown,
+ G_GNUC_UNUSED GError **error)
+{
GList *convs = NULL;
PurpleConversationManager *manager = NULL;
--- a/pidgin/plugins/xmppconsole/xmppconsole.c Tue Feb 21 21:43:14 2023 -0600
+++ b/pidgin/plugins/xmppconsole/xmppconsole.c Tue Feb 21 22:06:47 2023 -0600
@@ -186,7 +186,8 @@
}
static void
-purple_xmlnode_received_cb(PurpleConnection *gc, PurpleXmlNode **packet, gpointer null)
+purple_xmlnode_received_cb(PurpleConnection *gc, PurpleXmlNode **packet,
+ G_GNUC_UNUSED gpointer data)
{
GtkTextIter iter;
@@ -200,7 +201,8 @@
}
static void
-purple_xmlnode_sent_cb(PurpleConnection *gc, char **packet, gpointer null)
+purple_xmlnode_sent_cb(PurpleConnection *gc, char **packet,
+ G_GNUC_UNUSED gpointer data)
{
GtkTextIter iter;
PurpleXmlNode *node;
@@ -344,7 +346,7 @@
}
static void
-iq_clicked_cb(GtkWidget *w, gpointer data)
+iq_clicked_cb(G_GNUC_UNUSED GtkWidget *w, gpointer data)
{
PidginXmppConsole *console = data;
GtkStringObject *obj = NULL;
@@ -374,7 +376,7 @@
}
static void
-presence_clicked_cb(GtkWidget *w, gpointer data)
+presence_clicked_cb(G_GNUC_UNUSED GtkWidget *w, gpointer data)
{
PidginXmppConsole *console = data;
GtkStringObject *obj = NULL;
@@ -435,7 +437,7 @@
}
static void
-message_clicked_cb(GtkWidget *w, gpointer data)
+message_clicked_cb(G_GNUC_UNUSED GtkWidget *w, gpointer data)
{
PidginXmppConsole *console = data;
GtkStringObject *obj = NULL;
@@ -506,7 +508,7 @@
* GObject Implementation
*****************************************************************************/
static void
-pidgin_xmpp_console_class_finalize(PidginXmppConsoleClass *klass) {
+pidgin_xmpp_console_class_finalize(G_GNUC_UNUSED PidginXmppConsoleClass *klass) {
}
static void
@@ -616,7 +618,7 @@
}
static GPluginPluginInfo *
-xmpp_console_query(GError **error)
+xmpp_console_query(G_GNUC_UNUSED GError **error)
{
GActionEntry entries[] = {
{
@@ -680,7 +682,9 @@
}
static gboolean
-xmpp_console_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error)
+xmpp_console_unload(G_GNUC_UNUSED GPluginPlugin *plugin,
+ G_GNUC_UNUSED gboolean shutdown,
+ G_GNUC_UNUSED GError **error)
{
if (console) {
gtk_window_destroy(GTK_WINDOW(console));