# HG changeset patch
# Node ID 08789b0d571d
# Parent  f231aa3799e5
diff --git a/libpurple/protocols/facebook/api.c b/libpurple/protocols/facebook/api.c
--- a/libpurple/protocols/facebook/api.c
+++ b/libpurple/protocols/facebook/api.c
@@ -811,7 +811,7 @@ fb_api_cb_http_bool(GObject *source, GAs
 }
 
 static void
-fb_api_cb_mqtt_error(FbMqtt *mqtt, GError *error, gpointer data)
+fb_api_cb_mqtt_error(G_GNUC_UNUSED FbMqtt *mqtt, GError *error, gpointer data)
 {
 	FbApi *api = data;
 
@@ -1098,7 +1098,7 @@ fb_api_cb_publish_mark(FbApi *api, GByte
 }
 
 static GSList *
-fb_api_event_parse(FbApi *api, FbApiEvent *event, GSList *events,
+fb_api_event_parse(G_GNUC_UNUSED FbApi *api, FbApiEvent *event, GSList *events,
                    JsonNode *root, GError **error)
 {
 	const gchar *str;
@@ -1303,7 +1303,8 @@ fb_api_cb_publish_ms_r(FbApi *api, GByte
 }
 
 static gchar *
-fb_api_xma_parse(FbApi *api, const gchar *body, JsonNode *root, GError **error)
+fb_api_xma_parse(G_GNUC_UNUSED FbApi *api, const char *body, JsonNode *root,
+                 GError **error)
 {
 	const gchar *str;
 	const gchar *url;
@@ -1655,7 +1656,8 @@ beach:
 }
 
 static GSList *
-fb_api_cb_publish_ms_event(FbApi *api, JsonNode *root, GSList *events, FbApiEventType type, GError **error)
+fb_api_cb_publish_ms_event(G_GNUC_UNUSED FbApi *api, JsonNode *root,
+                           GSList *events, FbApiEventType type, GError **error)
 {
 	FbApiEvent *event;
 	FbJsonValues *values = NULL;
@@ -1861,8 +1863,8 @@ fb_api_cb_publish_p(FbApi *api, GByteArr
 }
 
 static void
-fb_api_cb_mqtt_publish(FbMqtt *mqtt, const gchar *topic, GByteArray *pload,
-                       gpointer data)
+fb_api_cb_mqtt_publish(G_GNUC_UNUSED FbMqtt *mqtt, const char *topic,
+                       GByteArray *pload, gpointer data)
 {
 	FbApi *api = data;
 	gboolean comp;
@@ -2282,7 +2284,8 @@ fb_api_cb_contacts_nodes(FbApi *api, Jso
 
 /* base64(contact:<our id>:<their id>:<whatever>) */
 static GSList *
-fb_api_cb_contacts_parse_removed(FbApi *api, JsonNode *node, GSList *users)
+fb_api_cb_contacts_parse_removed(G_GNUC_UNUSED FbApi *api, JsonNode *node,
+                                 GSList *users)
 {
 	gsize len;
 	char **split;
@@ -3363,7 +3366,9 @@ fb_api_thread_dup(const FbApiThread *thr
 
 	ret = g_memdup2(thrd, sizeof *thrd);
 	ret->topic = g_strdup(thrd->topic);
-	ret->users = g_slist_copy_deep(thrd->users, (GCopyFunc)fb_api_user_dup, NULL);
+	ret->users = g_slist_copy_deep(thrd->users,
+	                               (GCopyFunc)(GCallback)fb_api_user_dup,
+	                               NULL);
 
 	return ret;
 }
diff --git a/libpurple/protocols/facebook/data.c b/libpurple/protocols/facebook/data.c
--- a/libpurple/protocols/facebook/data.c
+++ b/libpurple/protocols/facebook/data.c
@@ -151,7 +151,7 @@ fb_data_image_class_init(FbDataImageClas
 }
 
 static void
-fb_data_image_init(FbDataImage *img)
+fb_data_image_init(G_GNUC_UNUSED FbDataImage *img)
 {
 }
 
diff --git a/libpurple/protocols/facebook/facebook.c b/libpurple/protocols/facebook/facebook.c
--- a/libpurple/protocols/facebook/facebook.c
+++ b/libpurple/protocols/facebook/facebook.c
@@ -298,7 +298,8 @@ fb_cb_api_contacts(FbApi *api, GSList *u
 }
 
 static void
-fb_cb_api_contacts_delta(FbApi *api, GSList *added, GSList *removed, gpointer data)
+fb_cb_api_contacts_delta(G_GNUC_UNUSED FbApi *api, GSList *added,
+                         GSList *removed, gpointer data)
 {
 	FbApiUser *user;
 	FbData *fata = data;
@@ -343,7 +344,7 @@ fb_cb_api_contacts_delta(FbApi *api, GSL
 }
 
 static void
-fb_cb_api_error(FbApi *api, GError *error, gpointer data)
+fb_cb_api_error(G_GNUC_UNUSED FbApi *api, GError *error, gpointer data)
 {
 	FbData *fata = data;
 	PurpleConnection *gc;
@@ -595,7 +596,7 @@ fb_cb_api_messages(FbApi *api, GSList *m
 }
 
 static void
-fb_cb_api_presences(FbApi *api, GSList *presences, gpointer data)
+fb_cb_api_presences(G_GNUC_UNUSED FbApi *api, GSList *presences, gpointer data)
 {
 	const gchar *statid;
 	FbData *fata = data;
@@ -624,7 +625,7 @@ fb_cb_api_presences(FbApi *api, GSList *
 }
 
 static void
-fb_cb_api_thread(FbApi *api, FbApiThread *thrd, gpointer data)
+fb_cb_api_thread(G_GNUC_UNUSED FbApi *api, FbApiThread *thrd, gpointer data)
 {
 	const gchar *name;
 	FbApiUser *user;
@@ -685,7 +686,7 @@ fb_cb_api_thread(FbApi *api, FbApiThread
 }
 
 static void
-fb_cb_api_thread_create(FbApi *api, FbId tid, gpointer data)
+fb_cb_api_thread_create(G_GNUC_UNUSED FbApi *api, FbId tid, gpointer data)
 {
 	FbData *fata = data;
 	gchar sid[FB_ID_STRMAX];
@@ -702,7 +703,8 @@ fb_cb_api_thread_create(FbApi *api, FbId
 }
 
 static void
-fb_cb_api_thread_kicked(FbApi *api, FbApiThread *thrd, gpointer data)
+fb_cb_api_thread_kicked(G_GNUC_UNUSED FbApi *api, FbApiThread *thrd,
+                        gpointer data)
 {
 	FbData *fata = data;
 	gchar tid[FB_ID_STRMAX];
@@ -738,7 +740,7 @@ fb_cb_api_thread_kicked(FbApi *api, FbAp
 }
 
 static void
-fb_cb_api_threads(FbApi *api, GSList *thrds, gpointer data)
+fb_cb_api_threads(G_GNUC_UNUSED FbApi *api, GSList *thrds, gpointer data)
 {
 	const gchar *alias;
 	FbApiUser *user;
@@ -801,7 +803,7 @@ fb_cb_api_threads(FbApi *api, GSList *th
 }
 
 static void
-fb_cb_api_typing(FbApi *api, FbApiTyping *typg, gpointer data)
+fb_cb_api_typing(G_GNUC_UNUSED FbApi *api, FbApiTyping *typg, gpointer data)
 {
 	FbData *fata = data;
 	gchar uid[FB_ID_STRMAX];
@@ -975,7 +977,7 @@ fb_blist_chat_init(PurpleBlistNode *node
 }
 
 static GList *
-fb_get_account_options(PurpleProtocol *protocol) {
+fb_get_account_options(G_GNUC_UNUSED PurpleProtocol *protocol) {
 	GList *opts = NULL;
 	PurpleAccountOption *opt;
 
@@ -1128,7 +1130,9 @@ fb_close(G_GNUC_UNUSED PurpleProtocol *p
 }
 
 static GList *
-fb_status_types(G_GNUC_UNUSED PurpleProtocol *protocol, PurpleAccount *acct) {
+fb_status_types(G_GNUC_UNUSED PurpleProtocol *protocol,
+                G_GNUC_UNUSED PurpleAccount *acct)
+{
 	PurpleStatusType *type;
 	GList *types = NULL;
 
@@ -1153,8 +1157,9 @@ fb_status_types(G_GNUC_UNUSED PurpleProt
 }
 
 static void
-fb_client_tooltip_text(PurpleProtocolClient *client, PurpleBuddy *buddy,
-                       PurpleNotifyUserInfo *info, gboolean full)
+fb_client_tooltip_text(G_GNUC_UNUSED PurpleProtocolClient *client,
+                       PurpleBuddy *buddy, PurpleNotifyUserInfo *info,
+                       G_GNUC_UNUSED gboolean full)
 {
 	const gchar *name;
 	PurplePresence *presence;
@@ -1174,7 +1179,8 @@ fb_client_tooltip_text(PurpleProtocolCli
 }
 
 static GList *
-fb_client_blist_node_menu(PurpleProtocolClient *client, PurpleBlistNode *node)
+fb_client_blist_node_menu(G_GNUC_UNUSED PurpleProtocolClient *client,
+                          PurpleBlistNode *node)
 {
 	FbData *fata;
 	GList *acts = NULL;
@@ -1199,13 +1205,14 @@ fb_client_blist_node_menu(PurpleProtocol
 }
 
 static gboolean
-fb_client_offline_message(PurpleProtocolClient *client, PurpleBuddy *buddy)
+fb_client_offline_message(G_GNUC_UNUSED PurpleProtocolClient *client,
+                          G_GNUC_UNUSED PurpleBuddy *buddy)
 {
 	return TRUE;
 }
 
 static void
-fb_server_set_status(PurpleProtocolServer *protocol_server,
+fb_server_set_status(G_GNUC_UNUSED PurpleProtocolServer *protocol_server,
                      PurpleAccount *acct, PurpleStatus *status)
 {
 	FbApi *api;
@@ -1231,7 +1238,8 @@ fb_server_set_status(PurpleProtocolServe
 }
 
 static gint
-fb_im_send(PurpleProtocolIM *im, PurpleConnection *gc, PurpleMessage *msg)
+fb_im_send(G_GNUC_UNUSED PurpleProtocolIM *im, PurpleConnection *gc,
+           PurpleMessage *msg)
 {
 	const gchar *name;
 	const gchar *text;
@@ -1254,7 +1262,7 @@ fb_im_send(PurpleProtocolIM *im, PurpleC
 }
 
 static guint
-fb_im_send_typing(PurpleProtocolIM *im, PurpleConnection *gc,
+fb_im_send_typing(G_GNUC_UNUSED PurpleProtocolIM *im, PurpleConnection *gc,
                   const gchar *name, PurpleIMTypingState state)
 {
 	FbApi *api;
@@ -1270,7 +1278,8 @@ fb_im_send_typing(PurpleProtocolIM *im, 
 }
 
 static GList *
-fb_chat_info(PurpleProtocolChat *protocol_chat, PurpleConnection *connection)
+fb_chat_info(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+             G_GNUC_UNUSED PurpleConnection *connection)
 {
 	GList *pces = NULL;
 	PurpleProtocolChatEntry *pce;
@@ -1285,7 +1294,8 @@ fb_chat_info(PurpleProtocolChat *protoco
 }
 
 static GHashTable *
-fb_chat_info_defaults(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
+fb_chat_info_defaults(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+                      G_GNUC_UNUSED PurpleConnection *connection,
                       const gchar *name)
 {
 	GHashTable *data;
@@ -1297,8 +1307,8 @@ fb_chat_info_defaults(PurpleProtocolChat
 }
 
 static void
-fb_chat_join(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
-             GHashTable *data)
+fb_chat_join(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+             PurpleConnection *gc, GHashTable *data)
 {
 	const gchar *name;
 	FbApi *api;
@@ -1341,7 +1351,8 @@ fb_chat_join(PurpleProtocolChat *protoco
 }
 
 static gchar *
-fb_chat_get_name(PurpleProtocolChat *protocol_chat, GHashTable *data)
+fb_chat_get_name(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+                 GHashTable *data)
 {
 	const gchar *name;
 
@@ -1352,8 +1363,9 @@ fb_chat_get_name(PurpleProtocolChat *pro
 }
 
 static void
-fb_chat_invite(PurpleProtocolChat *protocol_chat,  PurpleConnection *gc,
-               gint id, const gchar *msg, const gchar *who)
+fb_chat_invite(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+               PurpleConnection *gc, gint id, G_GNUC_UNUSED const char *msg,
+               const char *who)
 {
 	const gchar *name;
 	FbApi *api;
@@ -1390,8 +1402,8 @@ fb_chat_invite(PurpleProtocolChat *proto
 }
 
 static gint
-fb_chat_send(PurpleProtocolChat *protocol_chat, PurpleConnection *gc, gint id,
-             PurpleMessage *msg)
+fb_chat_send(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+             PurpleConnection *gc, gint id, PurpleMessage *msg)
 {
 	const gchar *name;
 	const gchar *text;
@@ -1427,8 +1439,8 @@ fb_chat_send(PurpleProtocolChat *protoco
 }
 
 static void
-fb_chat_set_topic(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
-                  gint id, const gchar *topic)
+fb_chat_set_topic(G_GNUC_UNUSED PurpleProtocolChat *protocol_chat,
+                  PurpleConnection *gc, gint id, const char *topic)
 {
 	const gchar *name;
 	FbApi *api;
@@ -1451,7 +1463,7 @@ fb_chat_set_topic(PurpleProtocolChat *pr
 }
 
 static PurpleRoomlist *
-fb_roomlist_get_list(PurpleProtocolRoomlist *protocol_roomlist,
+fb_roomlist_get_list(G_GNUC_UNUSED PurpleProtocolRoomlist *protocol_roomlist,
                      PurpleConnection *gc)
 {
 	FbApi *api;
@@ -1474,7 +1486,7 @@ fb_roomlist_get_list(PurpleProtocolRooml
 }
 
 static void
-fb_roomlist_cancel(PurpleProtocolRoomlist *protocol_roomlist,
+fb_roomlist_cancel(G_GNUC_UNUSED PurpleProtocolRoomlist *protocol_roomlist,
                    PurpleRoomlist *list)
 {
 	FbData *fata;
@@ -1496,8 +1508,8 @@ fb_roomlist_cancel(PurpleProtocolRoomlis
 }
 
 static PurpleCmdRet
-fb_cmd_kick(PurpleConversation *conv, const gchar *cmd, gchar **args,
-            gchar **error, gpointer data)
+fb_cmd_kick(PurpleConversation *conv, G_GNUC_UNUSED const char *cmd,
+            char **args, char **error, G_GNUC_UNUSED gpointer data)
 {
 	const gchar *name;
 	FbApi *api;
@@ -1538,8 +1550,9 @@ fb_cmd_kick(PurpleConversation *conv, co
 }
 
 static PurpleCmdRet
-fb_cmd_leave(PurpleConversation *conv, const gchar *cmd, gchar **args,
-             gchar **error, gpointer data)
+fb_cmd_leave(PurpleConversation *conv, G_GNUC_UNUSED const char *cmd,
+             G_GNUC_UNUSED char **args, G_GNUC_UNUSED char **error,
+             G_GNUC_UNUSED gpointer data)
 {
 	const gchar *name;
 	FbApi *api;
@@ -1568,7 +1581,7 @@ fb_cmd_leave(PurpleConversation *conv, c
 }
 
 static void
-facebook_protocol_init(FacebookProtocol *self) {
+facebook_protocol_init(G_GNUC_UNUSED FacebookProtocol *self) {
 }
 
 static void
@@ -1682,7 +1695,7 @@ fb_cmds_unregister(void)
 }
 
 static GPluginPluginInfo *
-facebook_query(GError **error)
+facebook_query(G_GNUC_UNUSED GError **error)
 {
 	return purple_plugin_info_new(
 		"id",          FB_PROTOCOL_ID,
@@ -1727,7 +1740,8 @@ facebook_load(GPluginPlugin *plugin, GEr
 }
 
 static gboolean
-facebook_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error)
+facebook_unload(G_GNUC_UNUSED GPluginPlugin *plugin,
+                G_GNUC_UNUSED gboolean shutdown, GError **error)
 {
 	PurpleProtocolManager *manager = purple_protocol_manager_get_default();
 
diff --git a/libpurple/protocols/facebook/meson.build b/libpurple/protocols/facebook/meson.build
--- a/libpurple/protocols/facebook/meson.build
+++ b/libpurple/protocols/facebook/meson.build
@@ -31,7 +31,9 @@ if DYNAMIC_FACEBOOK
 	    FACEBOOK_SOURCES + FACEBOOK_BUILT_SOURCES,
 	    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Purple-Facebook"'],
 	    dependencies : [json, libpurple_dep, libsoup, glib],
-	    install : true, install_dir : PURPLE_PLUGINDIR)
+	    install : true,
+	    install_dir : PURPLE_PLUGINDIR,
+	    override_options : ['c_std=c99', 'warning_level=2'])
 
 	# Used to produce docs.
 	facebook_inc = include_directories('.')
diff --git a/libpurple/protocols/facebook/mqtt.c b/libpurple/protocols/facebook/mqtt.c
--- a/libpurple/protocols/facebook/mqtt.c
+++ b/libpurple/protocols/facebook/mqtt.c
@@ -183,7 +183,7 @@ fb_mqtt_message_class_init(FbMqttMessage
 }
 
 static void
-fb_mqtt_message_init(FbMqttMessage *msg)
+fb_mqtt_message_init(G_GNUC_UNUSED FbMqttMessage *msg)
 {
 }
 
diff --git a/libpurple/protocols/facebook/thrift.c b/libpurple/protocols/facebook/thrift.c
--- a/libpurple/protocols/facebook/thrift.c
+++ b/libpurple/protocols/facebook/thrift.c
@@ -61,7 +61,7 @@ fb_thrift_class_init(FbThriftClass *klas
 }
 
 static void
-fb_thrift_init(FbThrift *thft)
+fb_thrift_init(G_GNUC_UNUSED FbThrift *thft)
 {
 }
 
diff --git a/libpurple/protocols/facebook/util.c b/libpurple/protocols/facebook/util.c
--- a/libpurple/protocols/facebook/util.c
+++ b/libpurple/protocols/facebook/util.c
@@ -326,7 +326,8 @@ fb_util_request_buddy_ok(gpointer *reque
 }
 
 static void
-fb_util_request_buddy_cancel(gpointer *request_data, PurpleRequestFields *fields)
+fb_util_request_buddy_cancel(gpointer *request_data,
+                             G_GNUC_UNUSED PurpleRequestFields *fields)
 {
 	FbUtilRequestBuddyFunc func = request_data[1];
 	gpointer data = request_data[2];
