Skip to content

Commit

Permalink
cov: Quieten some covscan warnings (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissie-c authored Dec 3, 2020
1 parent c2dfe66 commit 06ac2d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ipc_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion lib/ipc_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion tests/check_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 06ac2d4

Please sign in to comment.