diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c index 7aaabb78..dc85d3fe 100644 --- a/src/libostree/ostree-fetcher-curl.c +++ b/src/libostree/ostree-fetcher-curl.c @@ -693,7 +693,7 @@ adopt_steal_mainctx (OstreeFetcher *self, guint64 readytime = g_source_get_ready_time (self->timer_event); guint64 curtime = g_source_get_time (self->timer_event); guint64 timeout_micros = curtime - readytime; - if (timeout_micros < 0) + if (curtime < readytime) timeout_micros = 0; update_timeout_cb (self->multi, timeout_micros / 1000, self); } @@ -706,7 +706,7 @@ static void initiate_next_curl_request (FetcherRequest *req, GTask *task) { - CURLMcode rc; + CURLcode rc; OstreeFetcher *self = req->fetcher; if (req->easy) @@ -802,8 +802,8 @@ initiate_next_curl_request (FetcherRequest *req, curl_easy_setopt (req->easy, CURLOPT_WRITEDATA, task); curl_easy_setopt (req->easy, CURLOPT_PROGRESSDATA, task); - rc = curl_multi_add_handle (self->multi, req->easy); - g_assert (rc == CURLM_OK); + CURLMcode multi_rc = curl_multi_add_handle (self->multi, req->easy); + g_assert (multi_rc == CURLM_OK); } static void diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index a3cfd6f5..50829152 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -4960,7 +4960,6 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd, while (!ret_tmpdir.initialized) { struct dirent *dent; - glnx_fd_close int existing_tmpdir_fd = -1; g_autoptr(GError) local_error = NULL; if (!glnx_dirfd_iterator_next_dent (&dfd_iter, &dent, cancellable, error)) diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index 1f7e9382..8e8c4631 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -163,10 +163,8 @@ ostree_run (int argc, if (!command->fn) { - g_autoptr(GOptionContext) context = NULL; - g_autofree char *help = NULL; - - context = ostree_option_context_new_with_commands (commands); + g_autoptr(GOptionContext) context = + ostree_option_context_new_with_commands (commands); /* This will not return for some options (e.g. --version). */ if (ostree_option_context_parse (context, NULL, &argc, &argv, OSTREE_BUILTIN_FLAG_NO_REPO, NULL, cancellable, &error))