lib: misc static analysis fixes

This fixes a few warnings from coverity, none of which really
interesting.
This commit is contained in:
Luca BRUNO committed 2021-11-26 15:11:00 +00:00
1 parent 2dc6ec70ec
commit cefc1d7854
3 files changed
+4 -3

No files matched your search

+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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));