mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-20 18:09:21 +03:00
tree: fix compiler warnings
Mostly innocuous warnings, except for -Wtautological-compare, which caught a shady guint64 subtraction. Closes: #1245 Approved by: cgwalters
This commit is contained in:
parent
8a61f54239
commit
0c36433736
@ -693,7 +693,7 @@ adopt_steal_mainctx (OstreeFetcher *self,
|
|||||||
guint64 readytime = g_source_get_ready_time (self->timer_event);
|
guint64 readytime = g_source_get_ready_time (self->timer_event);
|
||||||
guint64 curtime = g_source_get_time (self->timer_event);
|
guint64 curtime = g_source_get_time (self->timer_event);
|
||||||
guint64 timeout_micros = curtime - readytime;
|
guint64 timeout_micros = curtime - readytime;
|
||||||
if (timeout_micros < 0)
|
if (curtime < readytime)
|
||||||
timeout_micros = 0;
|
timeout_micros = 0;
|
||||||
update_timeout_cb (self->multi, timeout_micros / 1000, self);
|
update_timeout_cb (self->multi, timeout_micros / 1000, self);
|
||||||
}
|
}
|
||||||
@ -706,7 +706,7 @@ static void
|
|||||||
initiate_next_curl_request (FetcherRequest *req,
|
initiate_next_curl_request (FetcherRequest *req,
|
||||||
GTask *task)
|
GTask *task)
|
||||||
{
|
{
|
||||||
CURLMcode rc;
|
CURLcode rc;
|
||||||
OstreeFetcher *self = req->fetcher;
|
OstreeFetcher *self = req->fetcher;
|
||||||
|
|
||||||
if (req->easy)
|
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_WRITEDATA, task);
|
||||||
curl_easy_setopt (req->easy, CURLOPT_PROGRESSDATA, task);
|
curl_easy_setopt (req->easy, CURLOPT_PROGRESSDATA, task);
|
||||||
|
|
||||||
rc = curl_multi_add_handle (self->multi, req->easy);
|
CURLMcode multi_rc = curl_multi_add_handle (self->multi, req->easy);
|
||||||
g_assert (rc == CURLM_OK);
|
g_assert (multi_rc == CURLM_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -4960,7 +4960,6 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd,
|
|||||||
while (!ret_tmpdir.initialized)
|
while (!ret_tmpdir.initialized)
|
||||||
{
|
{
|
||||||
struct dirent *dent;
|
struct dirent *dent;
|
||||||
glnx_fd_close int existing_tmpdir_fd = -1;
|
|
||||||
g_autoptr(GError) local_error = NULL;
|
g_autoptr(GError) local_error = NULL;
|
||||||
|
|
||||||
if (!glnx_dirfd_iterator_next_dent (&dfd_iter, &dent, cancellable, error))
|
if (!glnx_dirfd_iterator_next_dent (&dfd_iter, &dent, cancellable, error))
|
||||||
|
@ -163,10 +163,8 @@ ostree_run (int argc,
|
|||||||
|
|
||||||
if (!command->fn)
|
if (!command->fn)
|
||||||
{
|
{
|
||||||
g_autoptr(GOptionContext) context = NULL;
|
g_autoptr(GOptionContext) context =
|
||||||
g_autofree char *help = NULL;
|
ostree_option_context_new_with_commands (commands);
|
||||||
|
|
||||||
context = ostree_option_context_new_with_commands (commands);
|
|
||||||
|
|
||||||
/* This will not return for some options (e.g. --version). */
|
/* 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))
|
if (ostree_option_context_parse (context, NULL, &argc, &argv, OSTREE_BUILTIN_FLAG_NO_REPO, NULL, cancellable, &error))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user