Merge pull request #3024 from cgwalters/clang-analyzer-fixes-5

Clang analyzer fixes 5
This commit is contained in:
Joseph Marrero Corchado 2023-08-30 16:14:28 -04:00 committed by GitHub
commit d976ec5657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -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)
{

View File

@ -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))
@ -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;
}