[ostree] Squash some harmless compiler warnings



commit 4fff43da1bb4644b0f1420ab6db408fe4d3e7a34
Author: Colin Walters <walters verbum org>
Date:   Sat Jan 18 04:53:16 2014 -0500

    Squash some harmless compiler warnings
    
    None of these AFAICS actually can occur, but let's silence gcc.

 src/libostree/ostree-sysroot.c |    4 ++--
 src/ostree/ot-builtin-remote.c |    2 +-
 src/ostree/ot-dump.c           |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index 56811b8..fcbd3dc 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -680,8 +680,8 @@ ostree_sysroot_load (OstreeSysroot  *self,
 {
   gboolean ret = FALSE;
   guint i;
-  int bootversion;
-  int subbootversion;
+  int bootversion = 0;
+  int subbootversion = 0;
   gs_unref_ptrarray GPtrArray *boot_loader_configs = NULL;
   gs_unref_ptrarray GPtrArray *deployments = NULL;
 
diff --git a/src/ostree/ot-builtin-remote.c b/src/ostree/ot-builtin-remote.c
index 7db9edc..de6dcba 100644
--- a/src/ostree/ot-builtin-remote.c
+++ b/src/ostree/ot-builtin-remote.c
@@ -134,7 +134,7 @@ ostree_builtin_remote (int argc, char **argv, OstreeRepo *repo, GCancellable *ca
     }
   else if (!strcmp (op, "show-url"))
     {
-      gs_free char *url;
+      gs_free char *url = NULL;
 
       url = g_key_file_get_string (config, key, "url", error);
       if (url == NULL)
diff --git a/src/ostree/ot-dump.c b/src/ostree/ot-dump.c
index efa7f96..bb1f982 100644
--- a/src/ostree/ot-dump.c
+++ b/src/ostree/ot-dump.c
@@ -91,7 +91,7 @@ dump_commit (GVariant            *variant,
   const gchar *subject;
   const gchar *body;
   guint64 timestamp;
-  gs_free gchar *str;
+  gs_free gchar *str = NULL;
 
   /* See OSTREE_COMMIT_GVARIANT_FORMAT */
   g_variant_get (variant, "(a{sv}aya(say)&s&stayay)", NULL, NULL, NULL,


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