Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cov: Quieten some covscan warnings #427

Merged
merged 1 commit into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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