Commit 1c69089f authored by Vladimír Čunát's avatar Vladimír Čunát

Merge !431: daemon: fix clang warnings

parents f4e78b04 0c59fa91
......@@ -108,16 +108,6 @@ static void session_release(struct worker_ctx *worker, uv_handle_t *handle)
}
}
static uv_stream_t *handle_alloc(uv_loop_t *loop)
{
uv_stream_t *handle = calloc(1, sizeof(uv_handles_t));
if (!handle) {
return NULL;
}
return handle;
}
static uv_stream_t *handle_borrow(uv_loop_t *loop)
{
struct worker_ctx *worker = loop->data;
......@@ -219,7 +209,6 @@ int udp_bindfd(uv_udp_t *handle, int fd)
static void tcp_timeout_trigger(uv_timer_t *timer)
{
struct session *session = timer->data;
struct worker_ctx *worker = timer->loop->data;
assert(session->outgoing == false);
if (session->tasks.len > 0) {
......@@ -438,7 +427,6 @@ void io_deinit(uv_handle_t *handle)
if (!handle) {
return;
}
struct session *session = handle->data;
uv_loop_t *loop = handle->loop;
if (loop && loop->data) {
struct worker_ctx *worker = loop->data;
......
......@@ -149,10 +149,9 @@ static inline void iohandle_release(struct worker_ctx *worker, void *h)
{
assert(h);
const size_t size = sizeof(uv_handles_t);
if (worker->pool_iohandles.len < MP_FREELIST_SIZE) {
array_push(worker->pool_iohandles, h);
kr_asan_poison(h, size);
kr_asan_poison(h, sizeof(uv_handles_t));
} else {
free(h);
}
......@@ -188,10 +187,9 @@ static inline void iorequest_release(struct worker_ctx *worker, void *r)
{
assert(r);
const size_t size = sizeof(uv_reqs_t);
if (worker->pool_ioreqs.len < MP_FREELIST_SIZE) {
array_push(worker->pool_ioreqs, r);
kr_asan_poison(r, size);
kr_asan_poison(r, sizeof(uv_reqs_t));
} else {
free(r);
}
......@@ -1344,7 +1342,6 @@ static void subreq_finalize(struct qr_task *task, const struct sockaddr *packet_
qry->secret = leader_qry->secret;
leader_qry->secret = 0; /* Next will be already decoded */
}
struct session *follower_source_session = follower->ctx->source.session;
qr_task_step(follower, packet_source, pkt);
qr_task_unref(follower);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment