forked from Mirrors/flatpak-builder
Fix unused variable errors reported by clang
parent
f42a4d735b
commit
41d9717113
|
@ -1662,12 +1662,10 @@ flatpak_dir_update_appstream (FlatpakDir *self,
|
|||
if (is_oci)
|
||||
{
|
||||
g_autoptr(FlatpakOciRegistry) registry = NULL;
|
||||
g_autoptr(GFile) registry_file = NULL;
|
||||
g_autoptr(GError) local_error = NULL;
|
||||
g_autofree char *latest_alt_commit = NULL;
|
||||
g_autofree char *latest_commit = flatpak_dir_read_latest (self, remote, branch,
|
||||
&latest_alt_commit,
|
||||
cancellable, NULL);
|
||||
G_GNUC_UNUSED g_autofree char *latest_commit =
|
||||
flatpak_dir_read_latest (self, remote, branch, &latest_alt_commit, cancellable, NULL);
|
||||
|
||||
registry = flatpak_dir_create_system_child_oci_registry (self, &child_repo_lock, error);
|
||||
if (registry == NULL)
|
||||
|
@ -2127,7 +2125,6 @@ flatpak_dir_mirror_oci (FlatpakDir *self,
|
|||
g_autoptr(FlatpakOciRegistry) registry = NULL;
|
||||
g_autofree char *oci_uri = NULL;
|
||||
g_autofree char *oci_digest = NULL;
|
||||
g_autofree char *full_ref = NULL;
|
||||
g_autofree char *latest_rev = NULL;
|
||||
g_auto(GLnxConsoleRef) console = { 0, };
|
||||
g_autoptr(OstreeAsyncProgress) console_progress = NULL;
|
||||
|
@ -2203,9 +2200,9 @@ flatpak_dir_pull_oci (FlatpakDir *self,
|
|||
{
|
||||
g_autoptr(FlatpakOciRegistry) registry = NULL;
|
||||
g_autoptr(FlatpakOciVersioned) versioned = NULL;
|
||||
g_autofree char *full_ref = NULL;
|
||||
g_autofree char *oci_uri = NULL;
|
||||
g_autofree char *oci_digest = NULL;
|
||||
g_autofree char *full_ref = NULL;
|
||||
g_autofree char *checksum = NULL;
|
||||
g_auto(GLnxConsoleRef) console = { 0, };
|
||||
g_autoptr(OstreeAsyncProgress) console_progress = NULL;
|
||||
|
@ -2214,9 +2211,8 @@ flatpak_dir_pull_oci (FlatpakDir *self,
|
|||
g_autofree char *latest_alt_commit = NULL;
|
||||
g_autoptr(GVariant) metadata = NULL;
|
||||
g_autofree char *latest_rev = NULL;
|
||||
g_autofree char *latest_commit = flatpak_dir_read_latest (self, remote, ref,
|
||||
&latest_alt_commit,
|
||||
cancellable, NULL);
|
||||
G_GNUC_UNUSED g_autofree char *latest_commit =
|
||||
flatpak_dir_read_latest (self, remote, ref, &latest_alt_commit, cancellable, NULL);
|
||||
|
||||
/* This doesn't support specifying a specific digest, because that can't work
|
||||
with OCI signatures. We need to get that from the index */
|
||||
|
@ -2307,8 +2303,6 @@ flatpak_dir_pull (FlatpakDir *self,
|
|||
gboolean ret = FALSE;
|
||||
const char *rev;
|
||||
g_autofree char *url = NULL;
|
||||
g_autoptr(GBytes) summary_bytes = NULL;
|
||||
g_autofree char *latest_rev = NULL;
|
||||
g_auto(GLnxConsoleRef) console = { 0, };
|
||||
g_autoptr(OstreeAsyncProgress) console_progress = NULL;
|
||||
g_autoptr(GPtrArray) subdirs_arg = NULL;
|
||||
|
@ -4427,11 +4421,8 @@ flatpak_dir_create_system_child_oci_registry (FlatpakDir *self,
|
|||
g_autoptr(GFile) cache_dir = NULL;
|
||||
g_autoptr(GFile) repo_dir = NULL;
|
||||
g_autofree char *repo_url = NULL;
|
||||
g_autoptr(GFile) repo_dir_config = NULL;
|
||||
g_autoptr(OstreeRepo) repo = NULL;
|
||||
g_autofree char *tmpdir_name = NULL;
|
||||
g_autoptr(FlatpakOciRegistry) new_registry = NULL;
|
||||
g_autoptr(GKeyFile) config = NULL;
|
||||
|
||||
g_assert (!self->user);
|
||||
|
||||
|
|
|
@ -635,8 +635,6 @@ static char *
|
|||
get_digest_subpath (const char *digest,
|
||||
GError **error)
|
||||
{
|
||||
g_autofree char *subpath = NULL;
|
||||
|
||||
if (!g_str_has_prefix (digest, "sha256:"))
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
|
@ -751,7 +749,6 @@ flatpak_oci_registry_mirror_blob (FlatpakOciRegistry *self,
|
|||
{
|
||||
g_autofree char *subpath = NULL;
|
||||
glnx_fd_close int fd = -1;
|
||||
g_autoptr(SoupURI) baseuri = NULL;
|
||||
g_autofree char *tmp_path = NULL;
|
||||
g_autoptr(GOutputStream) out_stream = NULL;
|
||||
struct stat stbuf;
|
||||
|
@ -1605,7 +1602,6 @@ flatpak_oci_sign_data (GBytes *data,
|
|||
g_autofree char *tmp_path = NULL;
|
||||
g_autoptr(GOutputStream) tmp_signature_output = NULL;
|
||||
flatpak_auto_gpgme_ctx gpgme_ctx_t context = NULL;
|
||||
g_autoptr(GBytes) ret_signature = NULL;
|
||||
gpgme_error_t err;
|
||||
flatpak_auto_gpgme_data gpgme_data_t commit_buffer = NULL;
|
||||
flatpak_auto_gpgme_data gpgme_data_t signature_buffer = NULL;
|
||||
|
|
|
@ -4424,15 +4424,10 @@ flatpak_mirror_image_from_oci (FlatpakOciRegistry *dst_registry,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(OstreeMutableTree) archive_mtree = NULL;
|
||||
g_autoptr(GFile) archive_root = NULL;
|
||||
FlatpakOciPullProgressData progress_data = { progress_cb, progress_user_data };
|
||||
g_autoptr(GVariantBuilder) metadata_builder = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}"));
|
||||
g_autoptr(GVariant) metadata = NULL;
|
||||
g_autoptr(FlatpakOciVersioned) versioned = NULL;
|
||||
FlatpakOciManifest *manifest = NULL;
|
||||
g_autoptr(FlatpakOciDescriptor) manifest_desc = NULL;
|
||||
g_autofree char *new_manifest_digest = NULL;
|
||||
gsize versioned_size;
|
||||
g_autoptr(FlatpakOciIndex) index = NULL;
|
||||
int i;
|
||||
|
|
|
@ -252,7 +252,7 @@ handle_deploy (FlatpakSystemHelper *object,
|
|||
if (desc == NULL)
|
||||
{
|
||||
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
|
||||
"Can't find ref %s in child OCI registry index: %s", arg_ref);
|
||||
"Can't find ref %s in child OCI registry index", arg_ref);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@ handle_deploy_appstream (FlatpakSystemHelper *object,
|
|||
if (desc == NULL)
|
||||
{
|
||||
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
|
||||
"Can't find ref %s in child OCI registry index: %s", branch);
|
||||
"Can't find ref %s in child OCI registry index", branch);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue