Skip to content

Commit

Permalink
Merge pull request #3016 from cgwalters/more-analyzer-fixes-2
Browse files Browse the repository at this point in the history
More analyzer fixes 2
  • Loading branch information
cgwalters committed Aug 28, 2023
2 parents 89e13a9 + 0beaf5c commit 3acdbac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/libostree/ostree-repo-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/libostree/ostree-repo-finder-mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down Expand Up @@ -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);

Expand Down
4 changes: 3 additions & 1 deletion src/libostree/ostree-repo-pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3acdbac

Please sign in to comment.