summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-06-21 17:34:20 -0400
committerColin Walters <walters@verbum.org>2014-06-21 18:08:49 -0400
commit5936740b95729d28bf6c940d5dd6dfd68420b961 (patch)
tree2d85c9d3be0fb51eb3224346b650f46b4f37e3a7
parent54079982d8667f3f908a2f03a11c1c8ee0619839 (diff)
downloadostree-5936740b95729d28bf6c940d5dd6dfd68420b961.tar.gz
[staticanalysis]: Fix some dead code
One was an unused variable, the other is actually dead because we can't have mfile != NULL. https://bugzilla.gnome.org/show_bug.cgi?id=732020
-rw-r--r--src/libostree/ostree-repo-pull.c6
-rw-r--r--src/libotutil/ot-variant-utils.c3
2 files changed, 0 insertions, 9 deletions
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index d15e3369..837e5561 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -711,7 +711,6 @@ scan_commit_object (OtPullData *pull_data,
gs_unref_variant GVariant *commit = NULL;
gs_unref_variant GVariant *tree_contents_csum = NULL;
gs_unref_variant GVariant *tree_meta_csum = NULL;
- GVariantIter *iter = NULL;
if (recursion_depth > OSTREE_MAX_RECURSION)
{
@@ -755,8 +754,6 @@ scan_commit_object (OtPullData *pull_data,
ret = TRUE;
out:
- if (iter)
- g_variant_iter_free (iter);
return ret;
}
@@ -1036,7 +1033,6 @@ ostree_repo_pull (OstreeRepo *self,
gs_unref_hashtable GHashTable *requested_refs_to_fetch = NULL;
gs_unref_hashtable GHashTable *commits_to_fetch = NULL;
gs_free char *remote_mode_str = NULL;
- GSource *queue_src = NULL;
OtPullData pull_data_real = { 0, };
OtPullData *pull_data = &pull_data_real;
GKeyFile *config = NULL;
@@ -1310,8 +1306,6 @@ ostree_repo_pull (OstreeRepo *self,
g_free (pull_data->remote_name);
if (pull_data->base_uri)
soup_uri_free (pull_data->base_uri);
- if (queue_src)
- g_source_destroy (queue_src);
g_clear_pointer (&pull_data->static_delta_metas, (GDestroyNotify) g_ptr_array_unref);
g_clear_pointer (&pull_data->scanned_metadata, (GDestroyNotify) g_hash_table_unref);
g_clear_pointer (&pull_data->requested_content, (GDestroyNotify) g_hash_table_unref);
diff --git a/src/libotutil/ot-variant-utils.c b/src/libotutil/ot-variant-utils.c
index 24e5b552..ffc2defa 100644
--- a/src/libotutil/ot-variant-utils.c
+++ b/src/libotutil/ot-variant-utils.c
@@ -140,14 +140,11 @@ ot_util_variant_map (GFile *src,
trusted,
(GDestroyNotify) g_mapped_file_unref,
mfile);
- mfile = NULL;
g_variant_ref_sink (ret_variant);
ret = TRUE;
ot_transfer_out_value(out_variant, &ret_variant);
out:
- if (mfile)
- g_mapped_file_unref (mfile);
return ret;
}