From c1a2fb4f584162f1cf876daf06b1e2e409f93c0a Mon Sep 17 00:00:00 2001 From: Christine Caulfield Date: Thu, 3 Dec 2020 08:52:24 +0000 Subject: [PATCH] cov: Quieten some covscan warnings --- lib/ipc_setup.c | 4 ++-- lib/ipc_socket.c | 2 +- tests/check_loop.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c index f5dec9faa..c144a5ef2 100644 --- a/lib/ipc_setup.c +++ b/lib/ipc_setup.c @@ -570,10 +570,10 @@ qb_ipcs_us_publish(struct qb_ipcs_service * s) * security automatically */ if (use_filesystem_sockets()) { - res = chmod(un_addr.sun_path, S_IRWXU | S_IRWXG | S_IRWXO); + (void)chmod(un_addr.sun_path, S_IRWXU | S_IRWXG | S_IRWXO); } #ifdef SO_PASSCRED - setsockopt(s->server_sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)); + (void)setsockopt(s->server_sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)); #endif if (listen(s->server_sock, SERVER_BACKLOG) == -1) { qb_util_perror(LOG_ERR, "socket listen failed"); diff --git a/lib/ipc_socket.c b/lib/ipc_socket.c index 0a13ebf2f..178a63422 100644 --- a/lib/ipc_socket.c +++ b/lib/ipc_socket.c @@ -102,7 +102,7 @@ qb_ipc_dgram_sock_setup(const char *base_name, snprintf(sock_path, PATH_MAX, "%s-%s", base_name, service_name); set_sock_addr(&local_address, sock_path); if (use_filesystem_sockets()) { - res = unlink(local_address.sun_path); + (void)unlink(local_address.sun_path); } res = bind(request_fd, (struct sockaddr *)&local_address, sizeof(local_address)); diff --git a/tests/check_loop.c b/tests/check_loop.c index c017c2c2b..2bea159e0 100644 --- a/tests/check_loop.c +++ b/tests/check_loop.c @@ -474,7 +474,7 @@ static void stop_watch_tmo(void*data) per = ((sw->total * 100) / sw->count) / (float)sw->ns_timer; printf("average error for %"PRIu64" ns timer is %"PRIi64" (ns) (%f)\n", sw->ns_timer, - sw->total/sw->count, per); + (int64_t)(sw->total/sw->count), per); if (sw->killer) { qb_loop_stop(sw->l); }