summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Lebon <jonathan@jlebon.com>2021-11-26 10:55:15 -0500
committerGitHub <noreply@github.com>2021-11-26 10:55:15 -0500
commit267ca93da28e00adb3f961d208821bba4644a2d4 (patch)
treeabaa8272efd03a30f9735945732d052c7394a24a
parent2dc6ec70ec02afe2ffc5af511f40fa71d667dadd (diff)
parentcefc1d78544f90ffa0d665f823ef8263aec64fe9 (diff)
downloadostree-267ca93da28e00adb3f961d208821bba4644a2d4.tar.gz
Merge pull request #2490 from lucab/ups/static-fixes
-rw-r--r--src/libostree/ostree-fetcher-curl.c4
-rw-r--r--src/libostree/ostree-repo-commit.c2
-rw-r--r--tests/test-commit-sign-sh-ext.c1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c
index d6534b46..96f137df 100644
--- a/src/libostree/ostree-fetcher-curl.c
+++ b/src/libostree/ostree-fetcher-curl.c
@@ -770,8 +770,8 @@ initiate_next_curl_request (FetcherRequest *req,
curl_easy_setopt (req->easy, CURLOPT_URL, uri);
}
- curl_easy_setopt (req->easy, CURLOPT_USERAGENT,
- self->custom_user_agent ?: OSTREE_FETCHER_USERAGENT_STRING);
+ (void) curl_easy_setopt (req->easy, CURLOPT_USERAGENT,
+ self->custom_user_agent ?: OSTREE_FETCHER_USERAGENT_STRING);
/* Set caching request headers */
if (req->if_none_match != NULL)
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index 8ac963e7..0e830a6f 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -1683,8 +1683,8 @@ ostree_repo_prepare_transaction (OstreeRepo *self,
/* Set up to abort the transaction if we return early from this function.
* This needs to be manually built here due to a circular dependency. */
g_autoptr(OstreeRepoAutoTransaction) txn = g_malloc(sizeof(OstreeRepoAutoTransaction));
+ g_assert (txn != NULL);
txn->repo = self;
- (void) txn; /* Add use to silence static analysis */
memset (&self->txn.stats, 0, sizeof (OstreeRepoTransactionStats));
diff --git a/tests/test-commit-sign-sh-ext.c b/tests/test-commit-sign-sh-ext.c
index b5c5dcc6..173a0c6d 100644
--- a/tests/test-commit-sign-sh-ext.c
+++ b/tests/test-commit-sign-sh-ext.c
@@ -44,6 +44,7 @@ corrupt (GBytes *input)
g_assert_cmpint (len, >, 0);
g_assert_cmpint (len, <, G_MAXINT);
g_autofree char *newbuf = g_memdup (buf, len);
+ g_assert (newbuf != NULL);
int o = g_random_int_range (0, len);
newbuf[o] = (newbuf[0] + 1);