mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 10:00:43 +08:00
Silence GCC warn_unused_result warnings in tests
warn_unused_result is the persistent one that won't go away with a simple `(void)write(...)` and needs to be assigned to a variable (that must then also be declared unused or else you'll get a warning about _that_).
This commit is contained in:
parent
74b298a6f9
commit
8aac537191
|
@ -115,11 +115,11 @@ static void print_ignored_signals() {
|
||||||
|
|
||||||
static void print_stop_cont() {
|
static void print_stop_cont() {
|
||||||
signal(SIGTSTP, [](int) {
|
signal(SIGTSTP, [](int) {
|
||||||
write(STDOUT_FILENO, "SIGTSTP\n", strlen("SIGTSTP\n"));
|
auto __attribute__((unused)) _ = write(STDOUT_FILENO, "SIGTSTP\n", strlen("SIGTSTP\n"));
|
||||||
kill(getpid(), SIGSTOP);
|
kill(getpid(), SIGSTOP);
|
||||||
});
|
});
|
||||||
signal(SIGCONT, [](int) {
|
signal(SIGCONT, [](int) {
|
||||||
write(STDOUT_FILENO, "SIGCONT\n", strlen("SIGCONT\n"));
|
auto __attribute__((unused)) _ = write(STDOUT_FILENO, "SIGCONT\n", strlen("SIGCONT\n"));
|
||||||
});
|
});
|
||||||
char buff[1];
|
char buff[1];
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user