[gnome-builder/wip/slaf/xml-pack: 56/56] xml-pack: quiet some warnings



commit c45a5fccd6baf652ab9e8f10472679a7ba9e187f
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Thu Jul 13 14:11:33 2017 +0200

    xml-pack: quiet some warnings

 plugins/xml-pack/ide-xml-completion-attributes.c |    2 +-
 plugins/xml-pack/ide-xml-completion-provider.c   |   10 ++++------
 plugins/xml-pack/ide-xml-rng-parser.c            |    4 +---
 3 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/plugins/xml-pack/ide-xml-completion-attributes.c 
b/plugins/xml-pack/ide-xml-completion-attributes.c
index d322ad0..ea1f5e3 100644
--- a/plugins/xml-pack/ide-xml-completion-attributes.c
+++ b/plugins/xml-pack/ide-xml-completion-attributes.c
@@ -170,7 +170,7 @@ process_choice (MatchingState *state)
   GPtrArray *tmp_matches;
   GPtrArray *min_pos_match = NULL;
   IdeXmlRngDefine *defines;
-  gboolean node_has_attr;
+  gboolean node_has_attr G_GNUC_UNUSED;
   gint min_pos = G_MAXINT;
   gint pos;
 
diff --git a/plugins/xml-pack/ide-xml-completion-provider.c b/plugins/xml-pack/ide-xml-completion-provider.c
index 270988d..bdc2750 100644
--- a/plugins/xml-pack/ide-xml-completion-provider.c
+++ b/plugins/xml-pack/ide-xml-completion-provider.c
@@ -92,8 +92,6 @@ enum {
   N_PROPS
 };
 
-static GParamSpec *properties [N_PROPS];
-
 static void
 populate_state_free (PopulateState *state)
 {
@@ -420,7 +418,7 @@ matching_state_new (IdeXmlPosition  *position,
   return state;
 }
 
-static MatchingState *
+G_GNUC_UNUSED static MatchingState *
 matching_state_copy (MatchingState *state)
 {
   MatchingState *new_state;
@@ -992,7 +990,7 @@ ide_xml_completion_provider_new (void)
 static void
 ide_xml_completion_provider_finalize (GObject *object)
 {
-  IdeXmlCompletionProvider *self = (IdeXmlCompletionProvider *)object;
+  G_GNUC_UNUSED IdeXmlCompletionProvider *self = (IdeXmlCompletionProvider *)object;
 
   G_OBJECT_CLASS (ide_xml_completion_provider_parent_class)->finalize (object);
 }
@@ -1003,7 +1001,7 @@ ide_xml_completion_provider_get_property (GObject    *object,
                                           GValue     *value,
                                           GParamSpec *pspec)
 {
-  IdeXmlCompletionProvider *self = IDE_XML_COMPLETION_PROVIDER (object);
+  G_GNUC_UNUSED IdeXmlCompletionProvider *self = IDE_XML_COMPLETION_PROVIDER (object);
 
   switch (prop_id)
     {
@@ -1018,7 +1016,7 @@ ide_xml_completion_provider_set_property (GObject      *object,
                                           const GValue *value,
                                           GParamSpec   *pspec)
 {
-  IdeXmlCompletionProvider *self = IDE_XML_COMPLETION_PROVIDER (object);
+  G_GNUC_UNUSED IdeXmlCompletionProvider *self = IDE_XML_COMPLETION_PROVIDER (object);
 
   switch (prop_id)
     {
diff --git a/plugins/xml-pack/ide-xml-rng-parser.c b/plugins/xml-pack/ide-xml-rng-parser.c
index 56edc6a..6aaf957 100644
--- a/plugins/xml-pack/ide-xml-rng-parser.c
+++ b/plugins/xml-pack/ide-xml-rng-parser.c
@@ -116,7 +116,7 @@ _autofree_cleanup_xmlFree (void *p)
 
 #define g_autoxmlfree __attribute__((cleanup(_autofree_cleanup_xmlFree)))
 
-static void
+G_GNUC_UNUSED static void
 xml_document_free (XmlDocument *doc)
 {
   g_assert (doc != NULL);
@@ -1975,8 +1975,6 @@ ide_xml_rng_parser_parse (IdeXmlRngParser *self,
   g_autofree gchar *url;
   xmlDoc *doc;
   xmlNode *root;
-  guchar *mem;
-  gint size;
   gint options;
 
   g_return_val_if_fail (IDE_IS_XML_RNG_PARSER (self), NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]