- Fix Wunused-result compile warnings.

This commit is contained in:
George Thessalonikefs 2021-07-04 15:19:24 +02:00
parent a701ef75ed
commit c6fc7adeb1
4 changed files with 11 additions and 4 deletions

View file

@ -1171,7 +1171,8 @@ static RETSIGTYPE main_sigh(int sig)
char str[] = "exit on signal \n";
str[15] = '0' + (sig/10)%10;
str[16] = '0' + sig%10;
write(STDERR_FILENO, str, strlen(str));
/* simple cast to void will not silence Wunused-result */
(void)!write(STDERR_FILENO, str, strlen(str));
}
if(sig_base) {
ub_event_base_loopexit(sig_base);

View file

@ -1,3 +1,6 @@
4 July 2021: George
- Fix Wunused-result compile warnings.
2 July 2021: Tom
- Merge PR #491: Add SVCB and HTTPS types and handling according to draft-ietf-dnsop-svcb-https

View file

@ -350,7 +350,8 @@ static RETSIGTYPE delayer_sigh(int sig)
char str[] = "exit on signal \n";
str[15] = '0' + (sig/10)%10;
str[16] = '0' + sig%10;
write(STDOUT_FILENO, str, strlen(str));
/* simple cast to void will not silence Wunused-result */
(void)!write(STDOUT_FILENO, str, strlen(str));
do_quit = 1;
}

View file

@ -400,12 +400,14 @@ static RETSIGTYPE sigh(int sig)
char str[] = "Got unhandled signal \n";
if(sig == SIGPIPE) {
char* strpipe = "got SIGPIPE, remote connection gone\n";
write(STDOUT_FILENO, strpipe, strlen(strpipe));
/* simple cast to void will not silence Wunused-result */
(void)!write(STDOUT_FILENO, strpipe, strlen(strpipe));
exit(1);
}
str[21] = '0' + (sig/10)%10;
str[22] = '0' + sig%10;
write(STDOUT_FILENO, str, strlen(str));
/* simple cast to void will not silence Wunused-result */
(void)!write(STDOUT_FILENO, str, strlen(str));
exit(1);
}
#endif /* SIGPIPE */