Merge pull request #3016 from cgwalters/more-analyzer-fixes-2

More analyzer fixes 2
This commit is contained in:
Colin Walters 2023-08-28 16:10:58 -04:00 committed by GitHub
commit 3acdbac000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -1052,6 +1052,7 @@ write_content_object (OstreeRepo *self, const char *expected_checksum, GInputStr
actual_checksum, error))
return FALSE;
}
(void)actual_checksum_owned; // Just used to autofree
if (checksum_payload_input)
actual_payload_checksum = ot_checksum_instream_get_string (checksum_payload_input);

View File

@ -438,7 +438,6 @@ ostree_repo_finder_mount_resolve_async (OstreeRepoFinder *finder,
{
const OstreeCollectionRef *ref = refs[i];
g_autofree gchar *resolved_repo_uri = NULL;
g_autoptr (UriAndKeyring) resolved_repo = NULL;
for (gsize j = 0; j < repos_refs->len; j++)
{
@ -484,7 +483,8 @@ ostree_repo_finder_mount_resolve_async (OstreeRepoFinder *finder,
ref->collection_id, ref->ref_name, mount_name, resolved_repo_uri,
keyring_remote->keyring, keyring_remote->name);
resolved_repo = uri_and_keyring_new (resolved_repo_uri, keyring_remote);
g_autoptr (UriAndKeyring) resolved_repo
= uri_and_keyring_new (resolved_repo_uri, keyring_remote);
supported_ref_to_checksum = g_hash_table_lookup (repo_to_refs, resolved_repo);

View File

@ -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))
@ -6339,6 +6340,7 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self, const char *nam
return FALSE;
mainctx = _ostree_main_context_new_default ();
(void)mainctx; // Used for autocleanup
fetcher = _ostree_repo_remote_new_fetcher (self, name, TRUE, extra_headers, append_user_agent,
NULL, error);