Commit d4afdc68 authored by Jens Georg's avatar Jens Georg

Fix compiling with -Wall -Wextra

parent 1a24ed7e
......@@ -59,12 +59,12 @@ G_DEFINE_BOXED_TYPE (GUPnPCDSLastChangeEntry,
gupnp_cds_last_change_entry_unref);
static void
gupnp_cds_last_change_parser_init (GUPnPCDSLastChangeParser *parser)
gupnp_cds_last_change_parser_init (G_GNUC_UNUSED GUPnPCDSLastChangeParser *parser)
{
}
static void
gupnp_cds_last_change_parser_class_init (GUPnPCDSLastChangeParserClass *klass)
gupnp_cds_last_change_parser_class_init (G_GNUC_UNUSED GUPnPCDSLastChangeParserClass *klass)
{
}
......
......@@ -53,7 +53,7 @@ enum {
};
static void
gupnp_didl_lite_container_init (GUPnPDIDLLiteContainer *container)
gupnp_didl_lite_container_init (G_GNUC_UNUSED GUPnPDIDLLiteContainer *container)
{
/* Nothing to initialize, yay! */
}
......
......@@ -44,7 +44,7 @@ enum {
};
static void
gupnp_didl_lite_item_init (GUPnPDIDLLiteItem *item)
gupnp_didl_lite_item_init (G_GNUC_UNUSED GUPnPDIDLLiteItem *item)
{
/* Nothing to initialize, yay! */
}
......
......@@ -87,7 +87,7 @@ parse_elements (GUPnPDIDLLiteParser *parser,
GError **error);
static void
gupnp_didl_lite_parser_init (GUPnPDIDLLiteParser *parser)
gupnp_didl_lite_parser_init (G_GNUC_UNUSED GUPnPDIDLLiteParser *parser)
{
}
......
......@@ -105,9 +105,9 @@ return_point:
}
static void
on_protocol_info_changed (GUPnPProtocolInfo *info,
GParamSpec *pspec,
gpointer user_data)
on_protocol_info_changed (GUPnPProtocolInfo *info,
G_GNUC_UNUSED GParamSpec *pspec,
gpointer user_data)
{
GUPnPDIDLLiteResource *resource = GUPNP_DIDL_LITE_RESOURCE (user_data);
......
......@@ -184,8 +184,7 @@ is_standard_prop (const char *name,
static void
filter_attributes (xmlNode *node,
GList *allowed,
GUPnPDIDLLiteWriter *writer)
GList *allowed)
{
xmlAttr *attr;
GList *forbidden = NULL;
......@@ -219,7 +218,7 @@ filter_node (xmlNode *node,
const char *container_class = NULL;
if (!tags_only)
filter_attributes (node, allowed, writer);
filter_attributes (node, allowed);
if (strcmp ((const char *) node->name, "container") == 0) {
is_container = TRUE;
......
......@@ -39,7 +39,7 @@ G_DEFINE_TYPE (GUPnPFeatureListParser,
G_TYPE_OBJECT);
static void
gupnp_feature_list_parser_init (GUPnPFeatureListParser *parser)
gupnp_feature_list_parser_init (G_GNUC_UNUSED GUPnPFeatureListParser *parser)
{
/* Nothing to do here */
}
......@@ -118,9 +118,10 @@ get_feature_object_ids (xmlNode *feature)
* features or %NULL if an error occured.
**/
GList *
gupnp_feature_list_parser_parse_text (GUPnPFeatureListParser *parser,
const char *text,
GError **error)
gupnp_feature_list_parser_parse_text
(G_GNUC_UNUSED GUPnPFeatureListParser *parser,
const char *text,
GError **error)
{
xmlDoc *doc;
xmlNode *element;
......
......@@ -42,7 +42,7 @@ G_DEFINE_TYPE (GUPnPLastChangeParser,
G_TYPE_OBJECT);
static void
gupnp_last_change_parser_init (GUPnPLastChangeParser *parser)
gupnp_last_change_parser_init (G_GNUC_UNUSED GUPnPLastChangeParser *parser)
{
}
......@@ -147,11 +147,11 @@ gupnp_last_change_parser_new (void)
**/
gboolean
gupnp_last_change_parser_parse_last_change_valist
(GUPnPLastChangeParser *parser,
guint instance_id,
const char *last_change_xml,
GError **error,
va_list var_args)
(G_GNUC_UNUSED GUPnPLastChangeParser *parser,
guint instance_id,
const char *last_change_xml,
GError **error,
va_list var_args)
{
const char *variable_name;
xmlDoc *doc;
......
......@@ -82,7 +82,7 @@ reparent_children (GUPnPMediaCollection *collection)
static void
on_container_available (GUPnPMediaCollection *self,
GUPnPDIDLLiteContainer *container,
gpointer user_data)
G_GNUC_UNUSED gpointer user_data)
{
/* According to media format spec, there's only one container allowed;
* We allow any number of containers, but only the last one wins. */
......@@ -95,7 +95,7 @@ on_container_available (GUPnPMediaCollection *self,
static void
on_item_available (GUPnPMediaCollection *self,
GUPnPDIDLLiteItem *item,
gpointer user_data)
G_GNUC_UNUSED gpointer user_data)
{
self->priv->items = g_list_prepend (self->priv->items,
g_object_ref (item));
......
......@@ -2,7 +2,7 @@ SUBDIRS = gtest
common_cflags = \
$(LIBGUPNP_CFLAGS) \
-I$(top_srcdir)
-I$(top_srcdir) -Wno-unused-parameters
common_ldadd = \
$(top_builddir)/libgupnp-av/libgupnp-av-1.0.la \
$(LIBGUPNP_LIBS)
......
......@@ -75,7 +75,7 @@ check_feature (GUPnPFeature *feature)
}
int
main (int argc, char **argv)
main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
GUPnPFeatureListParser *parser;
GError *error;
......
......@@ -30,11 +30,11 @@ static const char * const searches[] = {
};
int
main (int argc, char **argv)
main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
GUPnPSearchCriteriaParser *parser;
GError *error;
int i;
guint i;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
......
......@@ -20,6 +20,7 @@
*/
#include <stdio.h>
#include <string.h>
#include <libgupnp-av/gupnp-cds-last-change-parser.h>
......@@ -395,7 +396,7 @@ TestReference test_reference_data[] = {
static void
compare_entries (const char *file, GList *entries)
{
int reference_size, i, j;
guint reference_size, i, j;
GList *it = entries;
reference_size = G_N_ELEMENTS (test_reference_data);
......
......@@ -19,6 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
#include <string.h>
#include <libgupnp-av/gupnp-media-collection.h>
/* Flat DIDL_S playlist */
......@@ -275,10 +277,10 @@ test_didl_collection_parse_full ()
#define ERROR_MESSAGE "Failed to parse DIDL-Lite: No 'DIDL-Lite' node in the DIDL-Lite XML:"
static gboolean
ignore_xml_parse_error (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
ignore_xml_parse_error (G_GNUC_UNUSED const gchar *log_domain,
G_GNUC_UNUSED GLogLevelFlags log_level,
const gchar *message,
G_GNUC_UNUSED gpointer user_data)
{
if (strncmp (message,
ERROR_MESSAGE,
......
......@@ -42,9 +42,9 @@
"</DIDL-Lite>"
static void
test_bgo674319_on_object_available (GUPnPDIDLLiteParser *parser,
GUPnPDIDLLiteObject *object,
gpointer user_data)
test_bgo674319_on_object_available (G_GNUC_UNUSED GUPnPDIDLLiteParser *parser,
GUPnPDIDLLiteObject *object,
gpointer user_data)
{
GUPnPDIDLLiteObject **out = (GUPnPDIDLLiteObject **) user_data;
*out = g_object_ref (object);
......
......@@ -23,40 +23,40 @@
#include <stdlib.h>
static void
begin_parens_cb (GUPnPSearchCriteriaParser *parser,
gpointer user_data)
begin_parens_cb (G_GNUC_UNUSED GUPnPSearchCriteriaParser *parser,
G_GNUC_UNUSED gpointer user_data)
{
g_print ("(");
}
static void
end_parens_cb (GUPnPSearchCriteriaParser *parser,
gpointer user_data)
end_parens_cb (G_GNUC_UNUSED GUPnPSearchCriteriaParser *parser,
G_GNUC_UNUSED gpointer user_data)
{
g_print (")");
}
static void
conjunction_cb (GUPnPSearchCriteriaParser *parser,
gpointer user_data)
conjunction_cb (G_GNUC_UNUSED GUPnPSearchCriteriaParser *parser,
G_GNUC_UNUSED gpointer user_data)
{
g_print (" and ");
}
static void
disjunction_cb (GUPnPSearchCriteriaParser *parser,
gpointer user_data)
disjunction_cb (G_GNUC_UNUSED GUPnPSearchCriteriaParser *parser,
G_GNUC_UNUSED gpointer user_data)
{
g_print (" or ");
}
static gboolean
expression_cb (GUPnPSearchCriteriaParser *parser,
const char *property,
GUPnPSearchCriteriaOp op,
const char *value,
GError **error,
gpointer user_data)
expression_cb (G_GNUC_UNUSED GUPnPSearchCriteriaParser *parser,
const char *property,
GUPnPSearchCriteriaOp op,
const char *value,
G_GNUC_UNUSED GError **error,
G_GNUC_UNUSED gpointer user_data)
{
g_print ("%s %d %s", property, op, value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment