tree-wide: Squash a few warnings when building with no features
authorColin Walters <walters@verbum.org>
Thu, 21 Sep 2017 15:01:29 +0000 (11:01 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 21 Sep 2017 15:37:48 +0000 (15:37 +0000)
Noticed these since I had a local configured build with no features for testing
the PAPR context for it.

Closes: #1201
Approved by: jlebon

src/ostree/ot-builtin-commit.c
src/ostree/ot-builtin-export.c

index eb5e99b042771147e10eaae805fbf763c984e96d..1665765febad94f431149800f858f65e67791071 100644 (file)
@@ -224,6 +224,7 @@ commit_filter (OstreeRepo         *self,
   return OSTREE_REPO_COMMIT_FILTER_ALLOW;
 }
 
+#ifdef HAVE_LIBARCHIVE
 typedef struct {
   GRegex *regex;
   const char *replacement;
@@ -245,6 +246,7 @@ handle_translate_pathname (OstreeRepo *repo,
   g_assert (ret);
   return ret;
 }
+#endif
 
 static gboolean
 commit_editor (OstreeRepo     *repo,
index aa79824e944ab1d13988cf6c21371afa155b7f82..b68cbb6da0cbc076e969c6298b22d26468ef0c2d 100644 (file)
@@ -68,15 +68,15 @@ ostree_builtin_export (int argc, char **argv, GCancellable *cancellable, GError
   g_autoptr(GOptionContext) context = NULL;
   g_autoptr(OstreeRepo) repo = NULL;
   gboolean ret = FALSE;
-  const char *rev;
   g_autoptr(GFile) root = NULL;
   g_autoptr(GFile) subtree = NULL;
   g_autofree char *commit = NULL;
   g_autoptr(GVariant) commit_data = NULL;
 #ifdef HAVE_LIBARCHIVE
+  const char *rev;
   g_autoptr(OtAutoArchiveWrite) a = NULL;
-#endif
   OstreeRepoExportArchiveOptions opts = { 0, };
+#endif
 
   context = g_option_context_new ("COMMIT - Stream COMMIT to stdout in tar format");