projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
520b45a
)
fetcher/soup: Fix gcc `-fanalyzer` warning
author
Colin Walters
<walters@verbum.org>
Fri, 8 Oct 2021 12:59:52 +0000
(08:59 -0400)
committer
Colin Walters
<walters@verbum.org>
Wed, 13 Oct 2021 21:13:14 +0000
(17:13 -0400)
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
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-fetcher-soup.c
b/src/libostree/ostree-fetcher-soup.c
index 5f707175b2ce0d811a5b8fea5da3f152c714314f..7df4848236af6df7292cef3de09dab1562fb21aa 100644
(file)
--- 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;