fish_test_helper: Fix warnings about intentionally unused results

Warnings were appearing under GCC 13.2

(void) alone is insufficient under modern compilers, workaround with logical
negation taken from GCC bug tracker.
This commit is contained in:
Mahmoud Al-Qudsi 2024-08-31 13:16:51 -05:00
parent ef6577db25
commit 73908f1218

View file

@ -162,11 +162,11 @@ static void print_ignored_signals() {
}
static void sigtstp_handler(int x) {
write(STDOUT_FILENO, "SIGTSTP\n", strlen("SIGTSTP\n"));
(void)!write(STDOUT_FILENO, "SIGTSTP\n", strlen("SIGTSTP\n"));
kill(getpid(), SIGSTOP);
}
static void sigcont_handler(int x) {
write(STDOUT_FILENO, "SIGCONT\n", strlen("SIGCONT\n"));
(void)!write(STDOUT_FILENO, "SIGCONT\n", strlen("SIGCONT\n"));
}
static void print_stop_cont() {
signal(SIGTSTP, &sigtstp_handler);