mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
Fix compiler warning in the tests
pid_t might be a long, so let's format it as a long and cast it explicitly.
This commit is contained in:
@@ -48,12 +48,13 @@ static void print_stdout_stderr() {
|
||||
}
|
||||
|
||||
static void print_pid_then_sleep() {
|
||||
fprintf(stdout, "%d\n", getpid());
|
||||
// On some systems getpid is a long, on others it's an int, let's just cast it.
|
||||
fprintf(stdout, "%ld\n", (long)getpid());
|
||||
fflush(nullptr);
|
||||
usleep(1000000 / 2); //.5 secs
|
||||
}
|
||||
|
||||
static void print_pgrp() { fprintf(stdout, "%d\n", getpgrp()); }
|
||||
static void print_pgrp() { fprintf(stdout, "%ld\n", (long)getpgrp()); }
|
||||
|
||||
static void print_fds() {
|
||||
bool needs_space = false;
|
||||
|
||||
Reference in New Issue
Block a user