diff options
author | Colin Walters <walters@verbum.org> | 2021-10-08 08:59:52 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2021-10-13 17:13:14 -0400 |
commit | 9a7f9c2095a1fe834793978250be402bfb8237f6 (patch) | |
tree | 4c92707ba479456460a0f87817a2df34ef1d6d88 /src/libostree | |
parent | a8eed03a1974c285cb7ddf550c7385a4783bb97d (diff) | |
download | ostree-9a7f9c2095a1fe834793978250be402bfb8237f6.tar.gz |
deployment: Fix gcc `-fanalyzer` warning
In general, we're probably going to need to change most of our
`g_return_if_fail` to `g_assert`. The analyzer flags that
the function can return `NULL`, but the caller isn't prepared for
this.
In practice, let's abort.
Diffstat (limited to 'src/libostree')
-rw-r--r-- | src/libostree/ostree-deployment.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libostree/ostree-deployment.c b/src/libostree/ostree-deployment.c index 558434de..6397d786 100644 --- a/src/libostree/ostree-deployment.c +++ b/src/libostree/ostree-deployment.c @@ -374,9 +374,9 @@ ostree_deployment_new (int index, OstreeDeployment *self; /* index may be -1 */ - g_return_val_if_fail (osname != NULL, NULL); - g_return_val_if_fail (csum != NULL, NULL); - g_return_val_if_fail (deployserial >= 0, NULL); + g_assert (osname != NULL); + g_assert (csum != NULL); + g_assert (deployserial >= 0); /* We can have "disconnected" deployments that don't have a bootcsum/serial */ |