tree-wide: [scan-build]: Add some asserts that pointers are non-NULL

More "scan-build doesn't understand GError and our out-param conventions"
AKA "these errors would be impossible with Rust's sum type Result<> approach".
This commit is contained in:
Colin Walters committed 2019-10-16 13:44:46 +00:00
1 parent 4a38b11159
commit a8dc90b02f
4 files changed
+7 -1

No files matched your search

+1
View File
@@ -313,6 +313,7 @@ cleanup_old_deployments (OstreeSysroot *self,
if (!list_all_deployment_directories (self, &all_deployment_dirs,
cancellable, error))
return FALSE;
g_assert (all_deployment_dirs); /* Pacify static analysis */
for (guint i = 0; i < all_deployment_dirs->len; i++)
{
OstreeDeployment *deployment = all_deployment_dirs->pdata[i];
+1
View File
@@ -945,6 +945,7 @@ ostree_sysroot_load_if_changed (OstreeSysroot *self,
g_autoptr(GPtrArray) deployments = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref);
g_assert (boot_loader_configs); /* Pacify static analysis */
for (guint i = 0; i < boot_loader_configs->len; i++)
{
OstreeBootconfigParser *config = boot_loader_configs->pdata[i];