[gnome-builder] fix various uninitialized warnings



commit 17157f3921a81d9006817024c6c0ade8d1d3ef7d
Author: Christian Hergert <chergert redhat com>
Date:   Sun Dec 17 02:50:20 2017 -0800

    fix various uninitialized warnings

 src/gstyle/gstyle-colorlexer.c                     |    2 +-
 src/gstyle/gstyle-palette.c                        |    4 ++--
 src/plugins/clang/ide-clang-code-indexer.c         |    2 +-
 .../flatpak/gbp-flatpak-configuration-provider.c   |    2 +-
 src/plugins/recent/gbp-recent-section.c            |    2 +-
 src/plugins/xml-pack/ide-xml-rng-parser.c          |    2 +-
 src/plugins/xml-pack/ide-xml-sax.c                 |   12 ++++++------
 src/plugins/xml-pack/ide-xml-symbol-node.c         |    2 +-
 8 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/gstyle/gstyle-colorlexer.c b/src/gstyle/gstyle-colorlexer.c
index f4878a5..5d4348d 100644
--- a/src/gstyle/gstyle-colorlexer.c
+++ b/src/gstyle/gstyle-colorlexer.c
@@ -2980,7 +2980,7 @@ gstyle_colorlexer_parse (const gchar *data)
 {
   GPtrArray *ar;
   GstyleColorItem *item;
-  GstyleColorScanner s;
+  GstyleColorScanner s = { 0 };
   gint token;
 
   if (gstyle_str_empty0 (data))
diff --git a/src/gstyle/gstyle-palette.c b/src/gstyle/gstyle-palette.c
index e8de101..05b2b35 100644
--- a/src/gstyle/gstyle-palette.c
+++ b/src/gstyle/gstyle-palette.c
@@ -133,8 +133,8 @@ static GstyleColor *
 gstyle_palette_xml_get_color (xmlTextReaderPtr reader)
 {
   GstyleColor *color = NULL;
-  g_autofree gchar *name;
-  g_autofree gchar *value;
+  g_autofree gchar *name = NULL;
+  g_autofree gchar *value = NULL;
 
   g_assert (reader != NULL);
 
diff --git a/src/plugins/clang/ide-clang-code-indexer.c b/src/plugins/clang/ide-clang-code-indexer.c
index b3a8a3e..fa36e36 100644
--- a/src/plugins/clang/ide-clang-code-indexer.c
+++ b/src/plugins/clang/ide-clang-code-indexer.c
@@ -144,7 +144,7 @@ ide_clang_code_indexer_generate_key_cb (GObject       *object,
   g_autoptr(IdeClangTranslationUnit) unit = NULL;
   g_autoptr(GTask) task = user_data;
   g_autoptr(GError) error = NULL;
-  g_autofree gchar *key;
+  g_autofree gchar *key = NULL;
   IdeSourceLocation *location;
 
   g_assert (IDE_IS_CLANG_SERVICE (service));
diff --git a/src/plugins/flatpak/gbp-flatpak-configuration-provider.c 
b/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
index 5a5a2a4..e127989 100644
--- a/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
+++ b/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
@@ -109,7 +109,7 @@ gbp_flatpak_configuration_provider_save_worker (GTask        *task,
       gboolean in_build_options;
       gboolean config_opts_replaced;
       gboolean build_options_replaced;
-      guint opts_per_line;
+      guint opts_per_line = 0;
       guint nested_curly_braces;
 
       GbpFlatpakConfiguration *configuration = (GbpFlatpakConfiguration *)g_ptr_array_index 
(self->configurations, i);
diff --git a/src/plugins/recent/gbp-recent-section.c b/src/plugins/recent/gbp-recent-section.c
index 721e692..bef958a 100644
--- a/src/plugins/recent/gbp-recent-section.c
+++ b/src/plugins/recent/gbp-recent-section.c
@@ -79,7 +79,7 @@ gbp_recent_section_filter_cb (GtkListBoxRow *row,
     DzlPatternSpec *spec;
     gboolean found;
   } *filter = user_data;
-  gboolean match;
+  gboolean match = FALSE;
 
   g_assert (GBP_IS_RECENT_PROJECT_ROW (row));
   g_assert (filter != NULL);
diff --git a/src/plugins/xml-pack/ide-xml-rng-parser.c b/src/plugins/xml-pack/ide-xml-rng-parser.c
index 65ec3db..e79c440 100644
--- a/src/plugins/xml-pack/ide-xml-rng-parser.c
+++ b/src/plugins/xml-pack/ide-xml-rng-parser.c
@@ -1977,7 +1977,7 @@ ide_xml_rng_parser_parse (IdeXmlRngParser *self,
                           GFile           *file)
 {
   IdeXmlSchema *schema = NULL;
-  g_autofree gchar *url;
+  g_autofree gchar *url = NULL;
   xmlDoc *doc;
   xmlNode *root;
   gint options;
diff --git a/src/plugins/xml-pack/ide-xml-sax.c b/src/plugins/xml-pack/ide-xml-sax.c
index e8217f9..4cb6eed 100644
--- a/src/plugins/xml-pack/ide-xml-sax.c
+++ b/src/plugins/xml-pack/ide-xml-sax.c
@@ -337,12 +337,12 @@ ide_xml_sax_get_location (IdeXmlSax    *self,
                           const gchar **content,
                           gsize        *size)
 {
-  gint tmp_line;
-  gint tmp_line_offset;
-  gint tmp_end_line;
-  gint tmp_end_line_offset;
-  const gchar *tmp_content;
-  gsize tmp_size;
+  gint tmp_line = 0;
+  gint tmp_line_offset = 0;
+  gint tmp_end_line = 0;
+  gint tmp_end_line_offset = 0;
+  const gchar *tmp_content = NULL;
+  gsize tmp_size = 0;
 
   g_return_val_if_fail (IDE_IS_XML_SAX (self), FALSE);
   g_return_val_if_fail (self->context != NULL, FALSE);
diff --git a/src/plugins/xml-pack/ide-xml-symbol-node.c b/src/plugins/xml-pack/ide-xml-symbol-node.c
index 1ea955d..ae852d5 100644
--- a/src/plugins/xml-pack/ide-xml-symbol-node.c
+++ b/src/plugins/xml-pack/ide-xml-symbol-node.c
@@ -737,7 +737,7 @@ ide_xml_symbol_node_print (IdeXmlSymbolNode  *self,
                            gboolean           show_value,
                            gboolean           show_attributes)
 {
-  g_autofree gchar *spacer;
+  g_autofree gchar *spacer = NULL;
   guint n_children;
   IdeXmlSymbolNode *child;
   Attribute *attr;


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