Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang analyzer fixes 5 #3024

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/libostree/ostree-repo-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ write_content_object (OstreeRepo *self, const char *expected_checksum, GInputStr
else
size = 0;

(void)file_input_owned; // Conditionally owned

/* Free space check; only applies during transactions */
if ((self->min_free_space_percent > 0 || self->min_free_space_mb > 0) && self->in_transaction)
{
Expand Down
11 changes: 6 additions & 5 deletions src/libotutil/ot-keyfile-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ ot_keyfile_get_string_list_with_separator_choice (GKeyFile *keyfile, const char
const char *key, const char *separators,
char ***out_value, GError **error)
{
g_return_val_if_fail (keyfile != NULL, FALSE);
g_return_val_if_fail (section != NULL, FALSE);
g_return_val_if_fail (key != NULL, FALSE);
g_return_val_if_fail (separators != NULL, FALSE);
g_assert (keyfile != NULL);
g_assert (section != NULL);
g_assert (key != NULL);
g_assert (separators != NULL);
g_assert (out_value != NULL);

g_autofree char *value_str = NULL;
if (!ot_keyfile_get_value_with_default (keyfile, section, key, NULL, &value_str, error))
Expand Down Expand Up @@ -215,7 +216,7 @@ ot_keyfile_get_string_list_with_separator_choice (GKeyFile *keyfile, const char
}
}

ot_transfer_out_value (out_value, &value_list);
*out_value = g_steal_pointer (&value_list);
return TRUE;
}

Expand Down
Loading