From 5b40d4bbbadb6af84b57b1282596cb58d147484b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 26 Aug 2023 12:23:36 -0400 Subject: [PATCH] pull: Add assertions to quiet clang-analyzer 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 517c426f..3e461e33 100644 --- 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)) -- 2.30.2