[ostree] core: Silence gcc -Wall compiler warnings



commit 1ba3a67eb5eb4d5b0d6a4d9d03c7c19455d0f084
Author: Colin Walters <walters verbum org>
Date:   Mon Nov 7 12:30:32 2011 -0500

    core: Silence gcc -Wall compiler warnings

 libostree/ostree-core.c           |    3 +--
 libostree/ostree-repo.c           |    1 -
 osbuild/ob-builtin-buildone.c     |    9 ++++++++-
 osbuild/osbuild-raw-makeinstall.c |    4 +---
 ostree/ot-builtin-checkout.c      |    1 -
 ostree/ot-builtin-rev-parse.c     |    2 --
 6 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/libostree/ostree-core.c b/libostree/ostree-core.c
index abd2d16..a54f628 100644
--- a/libostree/ostree-core.c
+++ b/libostree/ostree-core.c
@@ -646,8 +646,7 @@ unpack_file (const char   *path,
   guint32 metadata_len;
   guint32 version, uid, gid, mode;
   guint64 content_len;
-  gsize bytes_read, bytes_written;
-  int temp_fd = -1;
+  gsize bytes_read;
 
   file = ot_util_new_file_for_path (path);
 
diff --git a/libostree/ostree-repo.c b/libostree/ostree-repo.c
index 703dc88..97c9f42 100644
--- a/libostree/ostree-repo.c
+++ b/libostree/ostree-repo.c
@@ -936,7 +936,6 @@ ostree_repo_store_packfile (OstreeRepo       *self,
   gboolean ret = FALSE;
   GString *tempfile_path = NULL;
   GChecksum *checksum = NULL;
-  struct stat stbuf;
   gboolean did_exist;
 
   tempfile_path = g_string_new (priv->path);
diff --git a/osbuild/ob-builtin-buildone.c b/osbuild/ob-builtin-buildone.c
index d2da5e9..be16300 100644
--- a/osbuild/ob-builtin-buildone.c
+++ b/osbuild/ob-builtin-buildone.c
@@ -47,6 +47,9 @@ static GOptionEntry options[] = {
 };
 
 static char *
+get_tmpdir (void) G_GNUC_UNUSED;
+
+static char *
 get_tmpdir (void)
 {
   char *tmp_prefix = g_strdup (g_getenv ("XDG_RUNTIME_DIR"));
@@ -77,6 +80,11 @@ get_tmpdir (void)
 static gboolean
 open_log (const char *name, 
           GOutputStream **out_log,
+          GError **error) G_GNUC_UNUSED;
+
+static gboolean
+open_log (const char *name, 
+          GOutputStream **out_log,
           GError **error)
 {
   gboolean ret = FALSE;
@@ -108,7 +116,6 @@ osbuild_builtin_buildone (int argc, char **argv, const char *prefix, GError **er
 {
   GOptionContext *context;
   gboolean ret = FALSE;
-  char *tmpdir;
 
   context = g_option_context_new ("- Build current directory");
   g_option_context_add_main_entries (context, options, NULL);
diff --git a/osbuild/osbuild-raw-makeinstall.c b/osbuild/osbuild-raw-makeinstall.c
index 49013ed..63e043f 100644
--- a/osbuild/osbuild-raw-makeinstall.c
+++ b/osbuild/osbuild-raw-makeinstall.c
@@ -129,9 +129,7 @@ main (int    argc,
   GPtrArray *make_args;
   GPtrArray *makeinstall_args;
   GPtrArray *args;
-  int i;
   char **subprocess_env;
-  GError *error = NULL;
 
   g_type_init ();
 
@@ -150,7 +148,7 @@ main (int    argc,
       const char *autogen;
       char **autogen_env;
       
-      autogen = find_first_file (G_FILE_TEST_IS_EXECUTABLE, "./autogen", "./autogen.sh");
+      autogen = find_first_file (G_FILE_TEST_IS_EXECUTABLE, "./autogen", "./autogen.sh", NULL);
       if (!autogen)
         ot_util_fatal_literal ("No executable configure or autogen script found"); 
 
diff --git a/ostree/ot-builtin-checkout.c b/ostree/ot-builtin-checkout.c
index ae17143..8a80270 100644
--- a/ostree/ot-builtin-checkout.c
+++ b/ostree/ot-builtin-checkout.c
@@ -40,7 +40,6 @@ ostree_builtin_checkout (int argc, char **argv, const char *repo_path, GError **
   const char *commit;
   const char *destination;
   GFile *destf = NULL;
-  int i;
 
   context = g_option_context_new ("COMMIT DESTINATION - Check out a commit into a filesystem tree");
   g_option_context_add_main_entries (context, options, NULL);
diff --git a/ostree/ot-builtin-rev-parse.c b/ostree/ot-builtin-rev-parse.c
index 9ea172d..d878776 100644
--- a/ostree/ot-builtin-rev-parse.c
+++ b/ostree/ot-builtin-rev-parse.c
@@ -26,8 +26,6 @@
 
 #include <glib/gi18n.h>
 
-static char *repo_path;
-
 static GOptionEntry options[] = {
   { NULL }
 };



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