From 3159e04980e567a918e532e168dea89112922460 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 8 Oct 2021 08:59:52 -0400 Subject: [PATCH] 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. --- src/libostree/ostree-fetcher-soup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libostree/ostree-fetcher-soup.c b/src/libostree/ostree-fetcher-soup.c index 5f707175..7df48482 100644 --- a/src/libostree/ostree-fetcher-soup.c +++ b/src/libostree/ostree-fetcher-soup.c @@ -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;