[gupnp] Fix compilation with -Wall -Wextra
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] Fix compilation with -Wall -Wextra
- Date: Wed, 29 May 2013 13:36:29 +0000 (UTC)
commit 80b33de1f2ce499b1ddc70ab184127d190242da3
Author: Jens Georg <mail jensge org>
Date: Wed May 29 13:01:16 2013 +0200
Fix compilation with -Wall -Wextra
examples/light-client.c | 3 +-
examples/light-server.c | 24 ++++++++++++----
libgupnp/gupnp-context-manager.c | 6 ++--
libgupnp/gupnp-context.c | 28 +++++++++---------
libgupnp/gupnp-control-point.c | 18 ++++++------
libgupnp/gupnp-device-info.c | 2 +-
libgupnp/gupnp-device-proxy.c | 2 +-
libgupnp/gupnp-linux-context-manager.c | 16 +++++++----
libgupnp/gupnp-service-info.c | 6 ++--
libgupnp/gupnp-service-proxy.c | 32 +++++++++++-----------
libgupnp/gupnp-service.c | 46 ++++++++++++++++----------------
libgupnp/gupnp-unix-context-manager.c | 4 ++-
libgupnp/gupnp-xml-doc.c | 2 +-
tests/gtest/test-bugs.c | 32 +++++++++++-----------
tests/gtest/test-context.c | 10 +++---
tests/test-browsing.c | 20 +++++++-------
tests/test-introspection.c | 12 ++++----
tests/test-proxy.c | 26 +++++++++---------
tests/test-server.c | 10 +++---
19 files changed, 159 insertions(+), 140 deletions(-)
---
diff --git a/examples/light-client.c b/examples/light-client.c
index 69f2b74..60ce266 100644
--- a/examples/light-client.c
+++ b/examples/light-client.c
@@ -21,7 +21,8 @@ static enum {
} mode;
static void
-service_proxy_available_cb (GUPnPControlPoint *cp, GUPnPServiceProxy *proxy)
+service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPServiceProxy *proxy)
{
GError *error = NULL;
gboolean target;
diff --git a/examples/light-server.c b/examples/light-server.c
index acfd72d..2dcddf3 100644
--- a/examples/light-server.c
+++ b/examples/light-server.c
@@ -36,7 +36,9 @@ G_END_DECLS
/* SetTarget */
G_MODULE_EXPORT void
-set_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
+set_target_cb (GUPnPService *service,
+ GUPnPServiceAction *action,
+ G_GNUC_UNUSED gpointer user_data)
{
gboolean target;
@@ -62,7 +64,9 @@ set_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_
/* GetTarget */
G_MODULE_EXPORT void
-get_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
+get_target_cb (G_GNUC_UNUSED GUPnPService *service,
+ GUPnPServiceAction *action,
+ G_GNUC_UNUSED gpointer user_data)
{
gupnp_service_action_set (action,
"RetTargetValue", G_TYPE_BOOLEAN, status,
@@ -72,7 +76,9 @@ get_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_
/* GetStatus */
G_MODULE_EXPORT void
-get_status_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
+get_status_cb (G_GNUC_UNUSED GUPnPService *service,
+ GUPnPServiceAction *action,
+ G_GNUC_UNUSED gpointer user_data)
{
gupnp_service_action_set (action,
"ResultStatus", G_TYPE_BOOLEAN, status,
@@ -86,7 +92,10 @@ get_status_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_
/* Target */
G_MODULE_EXPORT void
-query_target_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
+query_target_cb (G_GNUC_UNUSED GUPnPService *service,
+ G_GNUC_UNUSED char *variable,
+ GValue *value,
+ G_GNUC_UNUSED gpointer user_data)
{
g_value_init (value, G_TYPE_BOOLEAN);
g_value_set_boolean (value, status);
@@ -94,7 +103,10 @@ query_target_cb (GUPnPService *service, char *variable, GValue *value, gpointer
/* Status */
G_MODULE_EXPORT void
-query_status_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
+query_status_cb (G_GNUC_UNUSED GUPnPService *service,
+ G_GNUC_UNUSED char *variable,
+ GValue *value,
+ G_GNUC_UNUSED gpointer user_data)
{
g_value_init (value, G_TYPE_BOOLEAN);
g_value_set_boolean (value, status);
@@ -102,7 +114,7 @@ query_status_cb (GUPnPService *service, char *variable, GValue *value, gpointer
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
GMainLoop *main_loop;
GError *error = NULL;
diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c
index d667ad6..4bf3cee 100644
--- a/libgupnp/gupnp-context-manager.c
+++ b/libgupnp/gupnp-context-manager.c
@@ -72,9 +72,9 @@ enum {
static guint signals[SIGNAL_LAST];
static void
-on_context_unavailable (GUPnPContextManager *manager,
- GUPnPContext *context,
- gpointer *user_data)
+on_context_unavailable (GUPnPContextManager *manager,
+ GUPnPContext *context,
+ G_GNUC_UNUSED gpointer *user_data)
{
GList *l;
diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c
index cbb7025..d9a36b0 100644
--- a/libgupnp/gupnp-context.c
+++ b/libgupnp/gupnp-context.c
@@ -222,8 +222,8 @@ gupnp_context_initable_init (GInitable *initable,
}
static void
-gupnp_context_initable_iface_init (gpointer g_iface,
- gpointer iface_data)
+gupnp_context_initable_iface_init (gpointer g_iface,
+ G_GNUC_UNUSED gpointer iface_data)
{
GInitableIface *iface = (GInitableIface *)g_iface;
initable_parent_iface = g_type_interface_peek_parent (iface);
@@ -476,12 +476,12 @@ gupnp_context_get_session (GUPnPContext *context)
* Default server handler: Return 404 not found.
**/
static void
-default_server_handler (SoupServer *server,
- SoupMessage *msg,
- const char *path,
- GHashTable *query,
- SoupClientContext *client,
- gpointer user_data)
+default_server_handler (G_GNUC_UNUSED SoupServer *server,
+ SoupMessage *msg,
+ G_GNUC_UNUSED const char *path,
+ G_GNUC_UNUSED GHashTable *query,
+ G_GNUC_UNUSED SoupClientContext *client,
+ G_GNUC_UNUSED gpointer user_data)
{
soup_message_set_status (msg, SOUP_STATUS_NOT_FOUND);
}
@@ -825,12 +825,12 @@ redirect_to_folder (SoupMessage *msg)
/* Serve @path. Note that we do not need to check for path including bogus
* '..' as libsoup does this for us. */
static void
-host_path_handler (SoupServer *server,
- SoupMessage *msg,
- const char *path,
- GHashTable *query,
- SoupClientContext *client,
- gpointer user_data)
+host_path_handler (G_GNUC_UNUSED SoupServer *server,
+ SoupMessage *msg,
+ const char *path,
+ G_GNUC_UNUSED GHashTable *query,
+ G_GNUC_UNUSED SoupClientContext *client,
+ gpointer user_data)
{
char *local_path, *path_to_open;
struct stat st;
diff --git a/libgupnp/gupnp-control-point.c b/libgupnp/gupnp-control-point.c
index deb19da..fe0c7b8 100644
--- a/libgupnp/gupnp-control-point.c
+++ b/libgupnp/gupnp-control-point.c
@@ -109,9 +109,9 @@ gupnp_control_point_init (GUPnPControlPoint *control_point)
/* Return TRUE if value == user_data */
static gboolean
-find_doc (gpointer key,
- gpointer value,
- gpointer user_data)
+find_doc (G_GNUC_UNUSED gpointer key,
+ gpointer value,
+ G_GNUC_UNUSED gpointer user_data)
{
return (value == user_data);
}
@@ -132,9 +132,9 @@ doc_finalized (gpointer user_data,
/* Release weak reference on xmlDoc wrapper */
static void
-weak_unref_doc (gpointer key,
- gpointer value,
- gpointer user_data)
+weak_unref_doc (G_GNUC_UNUSED gpointer key,
+ gpointer value,
+ gpointer user_data)
{
g_object_weak_unref (G_OBJECT (value), doc_finalized, user_data);
}
@@ -532,9 +532,9 @@ description_loaded (GUPnPControlPoint *control_point,
* Description URL downloaded.
*/
static void
-got_description_url (SoupSession *session,
- SoupMessage *msg,
- GetDescriptionURLData *data)
+got_description_url (G_GNUC_UNUSED SoupSession *session,
+ SoupMessage *msg,
+ GetDescriptionURLData *data)
{
GUPnPXMLDoc *doc;
diff --git a/libgupnp/gupnp-device-info.c b/libgupnp/gupnp-device-info.c
index 4f6fe2b..b18f3ec 100644
--- a/libgupnp/gupnp-device-info.c
+++ b/libgupnp/gupnp-device-info.c
@@ -654,7 +654,7 @@ typedef struct {
} Icon;
static Icon *
-icon_parse (GUPnPDeviceInfo *info, xmlNode *element)
+icon_parse (G_GNUC_UNUSED GUPnPDeviceInfo *info, xmlNode *element)
{
Icon *icon;
diff --git a/libgupnp/gupnp-device-proxy.c b/libgupnp/gupnp-device-proxy.c
index 59b8959..14885c9 100644
--- a/libgupnp/gupnp-device-proxy.c
+++ b/libgupnp/gupnp-device-proxy.c
@@ -97,7 +97,7 @@ gupnp_device_proxy_get_service (GUPnPDeviceInfo *info,
}
static void
-gupnp_device_proxy_init (GUPnPDeviceProxy *proxy)
+gupnp_device_proxy_init (G_GNUC_UNUSED GUPnPDeviceProxy *proxy)
{
}
diff --git a/libgupnp/gupnp-linux-context-manager.c b/libgupnp/gupnp-linux-context-manager.c
index 51c022c..2257a6e 100644
--- a/libgupnp/gupnp-linux-context-manager.c
+++ b/libgupnp/gupnp-linux-context-manager.c
@@ -196,13 +196,17 @@ network_device_create_context (NetworkInterface *device, const char *label)
}
static void
-context_signal_up (gpointer key, gpointer value, gpointer user_data)
+context_signal_up (G_GNUC_UNUSED gpointer key,
+ gpointer value,
+ gpointer user_data)
{
g_signal_emit_by_name (user_data, "context-available", value);
}
static void
-context_signal_down (gpointer key, gpointer value, gpointer user_data)
+context_signal_down (G_GNUC_UNUSED gpointer key,
+ gpointer value,
+ gpointer user_data)
{
g_signal_emit_by_name (user_data, "context-unavailable", value);
}
@@ -278,9 +282,9 @@ static void remove_context (GUPnPLinuxContextManager *self,
struct ifaddrmsg *ifa);
static gboolean
-on_netlink_message_available (GSocket *socket,
- GIOCondition condition,
- gpointer user_data)
+on_netlink_message_available (G_GNUC_UNUSED GSocket *socket,
+ G_GNUC_UNUSED GIOCondition condition,
+ gpointer user_data)
{
GUPnPLinuxContextManager *self;
@@ -540,7 +544,7 @@ receive_netlink_message (GUPnPLinuxContextManager *self, GError **error)
static char buf[4096];
static const int bufsize = 4096;
- int len;
+ gssize len;
GError *inner_error = NULL;
struct nlmsghdr *header = (struct nlmsghdr *) buf;
struct ifinfomsg *ifi;
diff --git a/libgupnp/gupnp-service-info.c b/libgupnp/gupnp-service-info.c
index 8849a67..1da6c19 100644
--- a/libgupnp/gupnp-service-info.c
+++ b/libgupnp/gupnp-service-info.c
@@ -616,9 +616,9 @@ gupnp_service_info_get_introspection (GUPnPServiceInfo *info,
* SCPD URL downloaded.
*/
static void
-got_scpd_url (SoupSession *session,
- SoupMessage *msg,
- GetSCPDURLData *data)
+got_scpd_url (G_GNUC_UNUSED SoupSession *session,
+ SoupMessage *msg,
+ GetSCPDURLData *data)
{
GUPnPServiceIntrospection *introspection;
GError *error;
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 0ff145d..fdf642e 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -401,9 +401,9 @@ gupnp_service_proxy_send_action (GUPnPServiceProxy *proxy,
}
static void
-stop_main_loop (GUPnPServiceProxy *proxy,
- GUPnPServiceProxyAction *action,
- gpointer user_data)
+stop_main_loop (G_GNUC_UNUSED GUPnPServiceProxy *proxy,
+ G_GNUC_UNUSED GUPnPServiceProxyAction *action,
+ gpointer user_data)
{
g_main_loop_quit ((GMainLoop *) user_data);
}
@@ -1164,10 +1164,10 @@ gupnp_service_proxy_end_action (GUPnPServiceProxy *proxy,
/* Checks an action response for errors and returns the parsed
* xmlDoc object. */
static xmlDoc *
-check_action_response (GUPnPServiceProxy *proxy,
- GUPnPServiceProxyAction *action,
- xmlNode **params,
- GError **error)
+check_action_response (G_GNUC_UNUSED GUPnPServiceProxy *proxy,
+ GUPnPServiceProxyAction *action,
+ xmlNode **params,
+ GError **error)
{
xmlDoc *response;
int code;
@@ -1810,12 +1810,12 @@ emit_notifications (gpointer user_data)
* message with our SID.
*/
static void
-server_handler (SoupServer *soup_server,
- SoupMessage *msg,
- const char *server_path,
- GHashTable *query,
- SoupClientContext *soup_client,
- gpointer user_data)
+server_handler (G_GNUC_UNUSED SoupServer *soup_server,
+ SoupMessage *msg,
+ G_GNUC_UNUSED const char *server_path,
+ G_GNUC_UNUSED GHashTable *query,
+ G_GNUC_UNUSED SoupClientContext *soup_client,
+ gpointer user_data)
{
GUPnPServiceProxy *proxy;
const char *hdr, *nt, *nts;
@@ -2004,9 +2004,9 @@ subscription_expire (gpointer user_data)
* Received subscription response.
*/
static void
-subscribe_got_response (SoupSession *session,
- SoupMessage *msg,
- GUPnPServiceProxy *proxy)
+subscribe_got_response (G_GNUC_UNUSED SoupSession *session,
+ SoupMessage *msg,
+ GUPnPServiceProxy *proxy)
{
GError *error;
diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c
index 2c4fd45..81e5607 100644
--- a/libgupnp/gupnp-service.c
+++ b/libgupnp/gupnp-service.c
@@ -434,7 +434,7 @@ gupnp_service_action_get_values (GUPnPServiceAction *action,
GList *arg_types)
{
GList *arg_values;
- int i;
+ guint i;
g_return_val_if_fail (action != NULL, NULL);
@@ -898,12 +898,12 @@ query_state_variable (GUPnPService *service,
/* controlURL handler */
static void
-control_server_handler (SoupServer *server,
- SoupMessage *msg,
- const char *server_path,
- GHashTable *query,
- SoupClientContext *soup_client,
- gpointer user_data)
+control_server_handler (SoupServer *server,
+ SoupMessage *msg,
+ G_GNUC_UNUSED const char *server_path,
+ G_GNUC_UNUSED GHashTable *query,
+ G_GNUC_UNUSED SoupClientContext *soup_client,
+ gpointer user_data)
{
GUPnPService *service;
GUPnPContext *context;
@@ -1286,12 +1286,12 @@ unsubscribe (GUPnPService *service,
/* eventSubscriptionURL handler */
static void
-subscription_server_handler (SoupServer *server,
- SoupMessage *msg,
- const char *server_path,
- GHashTable *query,
- SoupClientContext *soup_client,
- gpointer user_data)
+subscription_server_handler (G_GNUC_UNUSED SoupServer *server,
+ SoupMessage *msg,
+ G_GNUC_UNUSED const char *server_path,
+ G_GNUC_UNUSED GHashTable *query,
+ G_GNUC_UNUSED SoupClientContext *soup_client,
+ gpointer user_data)
{
GUPnPService *service;
const char *callback, *nt, *sid;
@@ -1362,7 +1362,7 @@ static void
got_introspection (GUPnPServiceInfo *info,
GUPnPServiceIntrospection *introspection,
const GError *error,
- gpointer user_data)
+ G_GNUC_UNUSED gpointer user_data)
{
GUPnPService *service = GUPNP_SERVICE (info);
const GList *state_variables, *l;
@@ -1467,9 +1467,9 @@ gupnp_service_constructor (GType type,
/* Root device availability changed. */
static void
-notify_available_cb (GObject *object,
- GParamSpec *pspec,
- gpointer user_data)
+notify_available_cb (GObject *object,
+ G_GNUC_UNUSED GParamSpec *pspec,
+ gpointer user_data)
{
GUPnPService *service;
@@ -1803,9 +1803,9 @@ gupnp_service_notify_valist (GUPnPService *service,
/* Received notify response. */
static void
-notify_got_response (SoupSession *session,
- SoupMessage *msg,
- gpointer user_data)
+notify_got_response (G_GNUC_UNUSED SoupSession *session,
+ SoupMessage *msg,
+ gpointer user_data)
{
SubscriptionData *data;
@@ -1874,9 +1874,9 @@ notify_got_response (SoupSession *session,
/* Send notification @user_data to subscriber @value */
static void
-notify_subscriber (gpointer key,
- gpointer value,
- gpointer user_data)
+notify_subscriber (G_GNUC_UNUSED gpointer key,
+ gpointer value,
+ gpointer user_data)
{
SubscriptionData *data;
const char *property_set;
diff --git a/libgupnp/gupnp-unix-context-manager.c b/libgupnp/gupnp-unix-context-manager.c
index 2b60de6..4b5c85e 100644
--- a/libgupnp/gupnp-unix-context-manager.c
+++ b/libgupnp/gupnp-unix-context-manager.c
@@ -62,6 +62,8 @@ gupnp_unix_context_manager_get_interfaces (GUPnPSimpleContextManager *manager)
struct ifaddrs *ifa_list, *ifa;
GList *processed;
+ g_return_val_if_fail (GUPNP_IS_UNIX_CONTEXT_MANAGER (manager), NULL);
+
if (getifaddrs (&ifa_list) != 0) {
g_warning ("Failed to retrieve list of network interfaces:%s\n",
strerror (errno));
@@ -92,7 +94,7 @@ gupnp_unix_context_manager_get_interfaces (GUPnPSimpleContextManager *manager)
}
static void
-gupnp_unix_context_manager_init (GUPnPUnixContextManager *manager)
+gupnp_unix_context_manager_init (G_GNUC_UNUSED GUPnPUnixContextManager *manager)
{
}
diff --git a/libgupnp/gupnp-xml-doc.c b/libgupnp/gupnp-xml-doc.c
index af6f3a0..fae4fa1 100644
--- a/libgupnp/gupnp-xml-doc.c
+++ b/libgupnp/gupnp-xml-doc.c
@@ -39,7 +39,7 @@ G_DEFINE_TYPE (GUPnPXMLDoc,
G_TYPE_OBJECT);
static void
-gupnp_xml_doc_init (GUPnPXMLDoc *doc)
+gupnp_xml_doc_init (G_GNUC_UNUSED GUPnPXMLDoc *doc)
{
/* Empty */
}
diff --git a/tests/gtest/test-bugs.c b/tests/gtest/test-bugs.c
index 4ada669..7161e63 100644
--- a/tests/gtest/test-bugs.c
+++ b/tests/gtest/test-bugs.c
@@ -50,41 +50,41 @@ typedef struct _TestBgo696762Data {
} TestBgo696762Data;
static void
-test_bgo_696762_on_browse_call (GUPnPService *service,
- GUPnPServiceAction *action,
- gpointer user_data)
+test_bgo_696762_on_browse_call (G_GNUC_UNUSED GUPnPService *service,
+ G_GNUC_UNUSED GUPnPServiceAction *action,
+ G_GNUC_UNUSED gpointer user_data)
{
xmlNode *node = action->node->children;
g_assert (node != NULL);
- g_assert_cmpstr (node->name, ==, "ObjectID");
+ g_assert_cmpstr ((const char *) node->name, ==, "ObjectID");
node = node->next;
g_assert (node != NULL);
- g_assert_cmpstr (node->name, ==, "BrowseFlag");
+ g_assert_cmpstr ((const char *) node->name, ==, "BrowseFlag");
node = node->next;
g_assert (node != NULL);
- g_assert_cmpstr (node->name, ==, "Filter");
+ g_assert_cmpstr ((const char *) node->name, ==, "Filter");
node = node->next;
g_assert (node != NULL);
- g_assert_cmpstr (node->name, ==, "StartingIndex");
+ g_assert_cmpstr ((const char *) node->name, ==, "StartingIndex");
node = node->next;
g_assert (node != NULL);
- g_assert_cmpstr (node->name, ==, "RequestedCount");
+ g_assert_cmpstr ((const char *) node->name, ==, "RequestedCount");
node = node->next;
g_assert (node != NULL);
- g_assert_cmpstr (node->name, ==, "SortCriteria");
+ g_assert_cmpstr ((const char *) node->name, ==, "SortCriteria");
node = node->next;
gupnp_service_action_return (action);
}
static void
-test_bgo_696762_on_browse (GUPnPServiceProxy *proxy,
- GUPnPServiceProxyAction *action,
- gpointer user_data)
+test_bgo_696762_on_browse (G_GNUC_UNUSED GUPnPServiceProxy *proxy,
+ G_GNUC_UNUSED GUPnPServiceProxyAction *action,
+ gpointer user_data)
{
TestBgo696762Data *data = (TestBgo696762Data *) user_data;
@@ -92,9 +92,9 @@ test_bgo_696762_on_browse (GUPnPServiceProxy *proxy,
}
static void
-test_bgo_696762_on_sp_available (GUPnPControlPoint *cp,
- GUPnPServiceProxy *proxy,
- gpointer user_data)
+test_bgo_696762_on_sp_available (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPServiceProxy *proxy,
+ gpointer user_data)
{
TestBgo696762Data *data = (TestBgo696762Data *) user_data;
@@ -104,7 +104,7 @@ test_bgo_696762_on_sp_available (GUPnPControlPoint *cp,
}
static gboolean
-test_bgo_696762_on_timeout (gpointer user_data)
+test_bgo_696762_on_timeout (G_GNUC_UNUSED gpointer user_data)
{
g_assert_not_reached ();
diff --git a/tests/gtest/test-context.c b/tests/gtest/test-context.c
index 9fbb257..edf41eb 100644
--- a/tests/gtest/test-context.c
+++ b/tests/gtest/test-context.c
@@ -23,13 +23,15 @@
#include <config.h>
#endif
+#include <string.h>
+
#include <libsoup/soup.h>
#include "libgupnp/gupnp.h"
static void
-on_message_finished (SoupSession *session,
- SoupMessage *message,
- gpointer user_data) {
+on_message_finished (G_GNUC_UNUSED SoupSession *session,
+ G_GNUC_UNUSED SoupMessage *message,
+ gpointer user_data) {
GMainLoop *loop = (GMainLoop*) user_data;
g_main_loop_quit (loop);
@@ -119,9 +121,7 @@ test_gupnp_context_http_ranged_requests (void)
guint port = 0;
char *uri = NULL;
GMainLoop *loop;
- goffset start, end, length;
GMappedFile *file;
- int result = 0;
goffset file_length = 0;
loop = g_main_loop_new (NULL, FALSE);
diff --git a/tests/test-browsing.c b/tests/test-browsing.c
index bdb78ae..d052f82 100644
--- a/tests/test-browsing.c
+++ b/tests/test-browsing.c
@@ -29,14 +29,14 @@
GMainLoop *main_loop;
static void
-interrupt_signal_handler (int signum)
+interrupt_signal_handler (G_GNUC_UNUSED int signum)
{
g_main_loop_quit (main_loop);
}
static void
-device_proxy_available_cb (GUPnPControlPoint *cp,
- GUPnPDeviceProxy *proxy)
+device_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPDeviceProxy *proxy)
{
const char *type, *location;
@@ -49,8 +49,8 @@ device_proxy_available_cb (GUPnPControlPoint *cp,
}
static void
-device_proxy_unavailable_cb (GUPnPControlPoint *cp,
- GUPnPDeviceProxy *proxy)
+device_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPDeviceProxy *proxy)
{
const char *type, *location;
@@ -63,8 +63,8 @@ device_proxy_unavailable_cb (GUPnPControlPoint *cp,
}
static void
-service_proxy_available_cb (GUPnPControlPoint *cp,
- GUPnPServiceProxy *proxy)
+service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPServiceProxy *proxy)
{
const char *type, *location;
@@ -77,8 +77,8 @@ service_proxy_available_cb (GUPnPControlPoint *cp,
}
static void
-service_proxy_unavailable_cb (GUPnPControlPoint *cp,
- GUPnPServiceProxy *proxy)
+service_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPServiceProxy *proxy)
{
const char *type, *location;
@@ -91,7 +91,7 @@ service_proxy_unavailable_cb (GUPnPControlPoint *cp,
}
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
GError *error;
GUPnPContext *context;
diff --git a/tests/test-introspection.c b/tests/test-introspection.c
index 1b25e5d..0a6ca16 100644
--- a/tests/test-introspection.c
+++ b/tests/test-introspection.c
@@ -39,7 +39,7 @@ static GOptionEntry entries[] =
};
static void
-interrupt_signal_handler (int signum)
+interrupt_signal_handler (G_GNUC_UNUSED int signum)
{
g_main_loop_quit (main_loop);
}
@@ -173,7 +173,7 @@ static void
got_introspection (GUPnPServiceInfo *info,
GUPnPServiceIntrospection *introspection,
const GError *error,
- gpointer user_data)
+ G_GNUC_UNUSED gpointer user_data)
{
if (error) {
g_warning ("Failed to create introspection for '%s': %s",
@@ -192,8 +192,8 @@ got_introspection (GUPnPServiceInfo *info,
}
static void
-service_proxy_available_cb (GUPnPControlPoint *cp,
- GUPnPServiceProxy *proxy)
+service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPServiceProxy *proxy)
{
GUPnPServiceInfo *info;
GUPnPServiceIntrospection *introspection;
@@ -216,8 +216,8 @@ service_proxy_available_cb (GUPnPControlPoint *cp,
}
static void
-service_proxy_unavailable_cb (GUPnPControlPoint *cp,
- GUPnPServiceProxy *proxy)
+service_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPServiceProxy *proxy)
{
const char *type, *location;
diff --git a/tests/test-proxy.c b/tests/test-proxy.c
index e7059d2..47ff0d2 100644
--- a/tests/test-proxy.c
+++ b/tests/test-proxy.c
@@ -29,24 +29,24 @@
GMainLoop *main_loop;
static void
-interrupt_signal_handler (int signum)
+interrupt_signal_handler (G_GNUC_UNUSED int signum)
{
g_main_loop_quit (main_loop);
}
static void
-subscription_lost_cb (GUPnPServiceProxy *proxy,
- const GError *reason,
- gpointer user_data)
+subscription_lost_cb (G_GNUC_UNUSED GUPnPServiceProxy *proxy,
+ const GError *reason,
+ G_GNUC_UNUSED gpointer user_data)
{
g_print ("Lost subscription: %s\n", reason->message);
}
static void
-notify_cb (GUPnPServiceProxy *proxy,
- const char *variable,
- GValue *value,
- gpointer user_data)
+notify_cb (G_GNUC_UNUSED GUPnPServiceProxy *proxy,
+ const char *variable,
+ GValue *value,
+ gpointer user_data)
{
g_print ("Received a notification for variable '%s':\n", variable);
g_print ("\tvalue: %d\n", g_value_get_uint (value));
@@ -54,8 +54,8 @@ notify_cb (GUPnPServiceProxy *proxy,
}
static void
-service_proxy_available_cb (GUPnPControlPoint *cp,
- GUPnPServiceProxy *proxy)
+service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPServiceProxy *proxy)
{
const char *location;
char *result = NULL;
@@ -135,8 +135,8 @@ service_proxy_available_cb (GUPnPControlPoint *cp,
}
static void
-service_proxy_unavailable_cb (GUPnPControlPoint *cp,
- GUPnPServiceProxy *proxy)
+service_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
+ GUPnPServiceProxy *proxy)
{
const char *location;
@@ -147,7 +147,7 @@ service_proxy_unavailable_cb (GUPnPControlPoint *cp,
}
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
GError *error;
GUPnPContext *context;
diff --git a/tests/test-server.c b/tests/test-server.c
index bed1a4b..095170b 100644
--- a/tests/test-server.c
+++ b/tests/test-server.c
@@ -29,16 +29,16 @@
GMainLoop *main_loop;
static void
-interrupt_signal_handler (int signum)
+interrupt_signal_handler (G_GNUC_UNUSED int signum)
{
g_main_loop_quit (main_loop);
}
static void
-notify_failed_cb (GUPnPService *service,
- const GList *callback_urls,
- const GError *reason,
- gpointer user_data)
+notify_failed_cb (G_GNUC_UNUSED GUPnPService *service,
+ G_GNUC_UNUSED const GList *callback_urls,
+ const GError *reason,
+ G_GNUC_UNUSED gpointer user_data)
{
g_print ("NOTIFY failed: %s\n", reason->message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]