fetcher/soup: 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.
This commit is contained in:
Colin Walters 2021-10-08 08:59:52 -04:00
parent 520b45afdd
commit 3159e04980
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ static OstreeFetcherPendingURI *
pending_uri_ref (OstreeFetcherPendingURI *pending)
{
gint refcount;
g_return_val_if_fail (pending != NULL, NULL);
g_assert (pending);
refcount = g_atomic_int_add (&pending->ref_count, 1);
g_assert (refcount > 0);
return pending;