summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-05-09 12:49:54 +0200
committerAlexander Larsson <alexl@redhat.com>2016-05-09 12:49:54 +0200
commit4f9ea6bb5715c69c560e8ca599c0dc4f2977bf85 (patch)
tree19175471aa4a52d561a7f04105bd7f9c9939464a
parent5e9b247d260ff4e2b9a9620053e61e8a0161cdee (diff)
downloadxdg-app-4f9ea6bb5715c69c560e8ca599c0dc4f2977bf85.tar.gz
Remove unused variables
This fixes warnings from clang
-rw-r--r--app/flatpak-builtins-build-bundle.c5
-rw-r--r--app/flatpak-builtins-build-import-bundle.c1
-rw-r--r--common/flatpak-dir.c4
-rw-r--r--common/flatpak-utils.c3
-rw-r--r--document-portal/Makefile.am.inc2
-rw-r--r--lib/flatpak-installation.c4
-rw-r--r--system-helper/flatpak-system-helper.c2
7 files changed, 2 insertions, 19 deletions
diff --git a/app/flatpak-builtins-build-bundle.c b/app/flatpak-builtins-build-bundle.c
index cc99843..fd23c23 100644
--- a/app/flatpak-builtins-build-bundle.c
+++ b/app/flatpak-builtins-build-bundle.c
@@ -256,9 +256,6 @@ build_bundle (OstreeRepo *repo, GFile *file,
#if defined(HAVE_LIBARCHIVE) && defined(HAVE_OSTREE_EXPORT_PATH_PREFIX)
-GLNX_DEFINE_CLEANUP_FUNCTION (void *, flatpak_local_free_read_archive, archive_read_free)
-#define free_read_archive __attribute__((cleanup (flatpak_local_free_read_archive)))
-
GLNX_DEFINE_CLEANUP_FUNCTION (void *, flatpak_local_free_write_archive, archive_write_free)
#define free_write_archive __attribute__((cleanup (flatpak_local_free_write_archive)))
@@ -752,7 +749,7 @@ build_oci (OstreeRepo *repo, GFile *file,
"This version of flatpak is not compiled with libarchive support");
return FALSE;
#else
- struct free_write_archive archive *a = NULL;
+ free_write_archive struct archive *a = NULL;
OstreeRepoExportArchiveOptions opts = { 0, };
g_autoptr(GFile) root = NULL;
g_autoptr(GFile) files = NULL;
diff --git a/app/flatpak-builtins-build-import-bundle.c b/app/flatpak-builtins-build-import-bundle.c
index b7e0d7e..8072f08 100644
--- a/app/flatpak-builtins-build-import-bundle.c
+++ b/app/flatpak-builtins-build-import-bundle.c
@@ -276,7 +276,6 @@ flatpak_builtin_build_import (int argc, char **argv, GCancellable *cancellable,
g_autoptr(GFile) file = NULL;
g_autoptr(GFile) repofile = NULL;
g_autoptr(OstreeRepo) repo = NULL;
- g_autoptr(GBytes) gpg_data = NULL;
const char *location;
const char *filename;
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
index bf737a2..4d41e04 100644
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -681,7 +681,6 @@ flatpak_create_deploy_data_from_old (FlatpakDir *self,
g_autofree char *old_origin = NULL;
g_autofree char *commit = NULL;
g_auto(GStrv) old_subpaths = NULL;
- g_autoptr(GFile) root = NULL;
g_autoptr(GFile) origin = NULL;
guint64 installed_size;
@@ -714,7 +713,6 @@ flatpak_dir_get_deploy_data (FlatpakDir *self,
g_autoptr(GError) my_error = NULL;
char *data = NULL;
gsize data_size;
- g_autofree char *active = NULL;
deploy_dir = flatpak_dir_get_if_deployed (self, ref, NULL, cancellable);
if (deploy_dir == NULL)
@@ -2723,8 +2721,6 @@ flatpak_dir_deploy_update (FlatpakDir *self,
GCancellable *cancellable,
GError **error)
{
- g_autofree char *previous_deployment = NULL;
-
g_autoptr(GError) my_error = NULL;
g_autoptr(GVariant) old_deploy_data = NULL;
g_auto(GLnxLockFile) lock = GLNX_LOCK_FILE_INIT;
diff --git a/common/flatpak-utils.c b/common/flatpak-utils.c
index b79e276..e768e26 100644
--- a/common/flatpak-utils.c
+++ b/common/flatpak-utils.c
@@ -1525,10 +1525,8 @@ flatpak_summary_lookup_ref (GVariant *summary, const char *ref, char **out_check
int pos;
g_autoptr(GVariant) refdata = NULL;
g_autoptr(GVariant) reftargetdata = NULL;
- g_autoptr(GVariant) commit_data = NULL;
guint64 commit_size;
g_autoptr(GVariant) commit_csum_v = NULL;
- g_autoptr(GBytes) commit_bytes = NULL;
if (!flatpak_variant_bsearch_str (refs, ref, &pos))
return FALSE;
@@ -2918,7 +2916,6 @@ flatpak_allocate_tmpdir (int tmpdir_dfd,
while (tmpdir_name == NULL)
{
- gs_dirfd_iterator_cleanup GSDirFdIterator child_dfd_iter = { 0, };
struct dirent *dent;
glnx_fd_close int existing_tmpdir_fd = -1;
g_autoptr(GError) local_error = NULL;
diff --git a/document-portal/Makefile.am.inc b/document-portal/Makefile.am.inc
index 3b1419b..f3dd0ba 100644
--- a/document-portal/Makefile.am.inc
+++ b/document-portal/Makefile.am.inc
@@ -30,4 +30,4 @@ xdg_document_portal_SOURCES = \
$(NULL)
xdg_document_portal_LDADD = $(BASE_LIBS) $(FUSE_LIBS) libflatpak-common.la
-xdg_document_portal_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) $(XAUTH_LIBS) $(FUSE_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal
+xdg_document_portal_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) $(FUSE_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal
diff --git a/lib/flatpak-installation.c b/lib/flatpak-installation.c
index 0770f64..46e0ecc 100644
--- a/lib/flatpak-installation.c
+++ b/lib/flatpak-installation.c
@@ -834,8 +834,6 @@ flatpak_installation_install_bundle (FlatpakInstallation *self,
g_autoptr(GFile) deploy_base = NULL;
g_autoptr(FlatpakDir) dir_clone = NULL;
FlatpakInstalledRef *result = NULL;
- g_autoptr(GError) local_error = NULL;
- g_auto(GLnxLockFile) lock = GLNX_LOCK_FILE_INIT;
g_autoptr(GVariant) metadata = NULL;
g_autofree char *origin = NULL;
g_auto(GStrv) parts = NULL;
@@ -947,8 +945,6 @@ flatpak_installation_install (FlatpakInstallation *self,
g_autoptr(GMainContext) main_context = NULL;
g_autoptr(OstreeAsyncProgress) ostree_progress = NULL;
FlatpakInstalledRef *result = NULL;
- g_autoptr(GError) local_error = NULL;
- g_auto(GLnxLockFile) lock = GLNX_LOCK_FILE_INIT;
ref = flatpak_compose_ref (kind == FLATPAK_REF_KIND_APP, name, branch, arch, error);
if (ref == NULL)
diff --git a/system-helper/flatpak-system-helper.c b/system-helper/flatpak-system-helper.c
index fd03ccb..918d6b2 100644
--- a/system-helper/flatpak-system-helper.c
+++ b/system-helper/flatpak-system-helper.c
@@ -55,8 +55,6 @@ handle_deploy (FlatpakSystemHelper *object,
g_autoptr(GFile) path = g_file_new_for_path (arg_repo_path);
g_autoptr(GError) error = NULL;
g_autoptr(GFile) deploy_dir = NULL;
- g_autoptr(AutoPolkitSubject) subject = NULL;
- g_autoptr(AutoPolkitDetails) details = NULL;
gboolean is_update;
g_autoptr(GMainContext) main_context = NULL;