tree-wide: [scan-build] Add some not-null assertions

I don't understand why this doesn't happen in more places;
it may have to do with the depth of the call chain?
Anyways, add some more asserts that values aren't NULL.
This commit is contained in:
Colin Walters 2019-10-16 19:24:54 +00:00 committed by OpenShift Merge Robot
parent e0102550d7
commit 122811a1ba
2 changed files with 3 additions and 0 deletions

View File

@ -603,6 +603,7 @@ rpmostree_compose_builtin_rojig (int argc,
g_autoptr(RpmOstreeRojigCompose) self = NULL;
if (!rpm_ostree_rojig_compose_new (treefile_path, &self, cancellable, error))
return FALSE;
g_assert (self); /* Pacify static analysis */
gboolean changed;
if (!impl_rojig_build (self, outdir, &changed, cancellable, error))
return FALSE;

View File

@ -1187,6 +1187,7 @@ rpmostree_compose_builtin_install (int argc,
g_autoptr(RpmOstreeTreeComposeContext) self = NULL;
if (!rpm_ostree_compose_context_new (treefile_path, &self, cancellable, error))
return FALSE;
g_assert (self); /* Pacify static analysis */
gboolean changed;
if (!impl_install_tree (self, &changed, cancellable, error))
{
@ -1347,6 +1348,7 @@ rpmostree_compose_builtin_tree (int argc,
g_autoptr(RpmOstreeTreeComposeContext) self = NULL;
if (!rpm_ostree_compose_context_new (treefile_path, &self, cancellable, error))
return FALSE;
g_assert (self); /* Pacify static analysis */
gboolean changed;
if (!impl_install_tree (self, &changed, cancellable, error))
{