projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cfa5e8
)
pull: Add assertions to quiet clang-analyzer
author
Colin Walters
<walters@verbum.org>
Sat, 26 Aug 2023 16:23:36 +0000
(12:23 -0400)
committer
Colin Walters
<walters@verbum.org>
Sat, 26 Aug 2023 16:24:10 +0000
(12:24 -0400)
It's warning the value can be NULL, but I don't think that's true.
I believe we're just hitting analysis limit (the path length is 119).
src/libostree/ostree-repo-pull.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-repo-pull.c
b/src/libostree/ostree-repo-pull.c
index 517c426facec10b3cdb3c64ce83ad740b10bb003..3e461e33702a95536bc25a1040169da52933b271 100644
(file)
--- a/
src/libostree/ostree-repo-pull.c
+++ b/
src/libostree/ostree-repo-pull.c
@@
-784,7
+784,7
@@
fetch_ref_contents (OtPullData *pull_data, const char *main_collection_id,
filename, pull_data->n_network_retries,
&ret_contents, cancellable, error))
return FALSE;
-
+ g_assert (ret_contents);
g_strchomp (ret_contents);
}
@@
-1951,6
+1951,7
@@
load_remote_repo_config (OtPullData *pull_data, GKeyFile **out_keyfile, GCancell
"config", pull_data->n_network_retries, &contents,
cancellable, error))
return FALSE;
+ g_assert (contents);
g_autoptr (GKeyFile) ret_keyfile = g_key_file_new ();
if (!g_key_file_load_from_data (ret_keyfile, contents, strlen (contents), 0, error))