diff options
author | Colin Walters <walters@verbum.org> | 2014-06-21 17:28:54 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-06-21 18:08:49 -0400 |
commit | 2dc0cea50310a6707d45351cfdf9a334c2bc85c1 (patch) | |
tree | 364863fa7f8f79b246a34e1bdfbf6ef74be36a52 | |
parent | dfda6e3a46135bb03a0eab6758b4687078016aa6 (diff) | |
download | ostree-2dc0cea50310a6707d45351cfdf9a334c2bc85c1.tar.gz |
[staticanalysis]: Add assertion to pacify analyzer
This condition can't actually be hit, let's hint that's the case.
https://bugzilla.gnome.org/show_bug.cgi?id=732020
-rw-r--r-- | src/libostree/ostree-repo-commit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index b9553707..3ae8ae24 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -368,11 +368,11 @@ write_object (OstreeRepo *self, gsize unpacked_size = 0; gboolean indexable = FALSE; + g_return_val_if_fail (expected_checksum || out_csum, FALSE); + if (g_cancellable_set_error_if_cancelled (cancellable, error)) return FALSE; - g_assert (expected_checksum || out_csum); - if (expected_checksum) { if (!_ostree_repo_has_loose_object (self, expected_checksum, objtype, @@ -522,6 +522,8 @@ write_object (OstreeRepo *self, goto out; } } + + g_assert (actual_checksum != NULL); /* Pacify static analysis */ if (indexable) { |