[ostree] lib: Two more compiler warning fixes



commit 61b4f268622e64610e14883367cbead18c716bc4
Author: Colin Walters <walters verbum org>
Date:   Mon Feb 22 21:11:10 2016 -0500

    lib: Two more compiler warning fixes

 src/libostree/ostree-repo-libarchive.c |    2 +-
 src/libostree/ostree-repo.c            |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libostree/ostree-repo-libarchive.c b/src/libostree/ostree-repo-libarchive.c
index b21e222..1c05159 100644
--- a/src/libostree/ostree-repo-libarchive.c
+++ b/src/libostree/ostree-repo-libarchive.c
@@ -640,7 +640,7 @@ write_directory_to_libarchive_recurse (OstreeRepo               *self,
                   if (r != bytes_read)
                     {
                       propagate_libarchive_error (error, a);
-                      g_prefix_error (error, "Failed to write %" G_GUINT64_FORMAT " bytes (code %" 
G_GUINT64_FORMAT"): ", (guint64)bytes_read, r);
+                      g_prefix_error (error, "Failed to write %" G_GUINT64_FORMAT " bytes (code %" 
G_GUINT64_FORMAT"): ", (guint64)bytes_read, (guint64)r);
                       goto out;
                     }
                 }
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 1e9673d..3b08d44 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -4604,8 +4604,8 @@ ostree_repo_regenerate_summary (OstreeRepo     *self,
         gs_free char *from = NULL;
         gs_free char *to = NULL;
         gs_free guchar *csum = NULL;
-        gs_free char *superblock;
-        gs_fd_close int superblock_file_fd;
+        gs_free char *superblock = NULL;
+        gs_fd_close int superblock_file_fd = -1;
         g_autoptr(GInputStream) in_stream = NULL;
 
         _ostree_parse_delta_name (delta_names->pdata[i], &from, &to);


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