From 6829c9d678fd099b128c1f2176ab3a5e0fcdc928 Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Mon, 6 Oct 2025 18:50:28 +0200 Subject: [PATCH] printf-c: restore length modifiers These were accidentally removed when semi-automatically removing length modifiers from Rust code and shell scripts. In C, the length modifiers are required. Closes #11898 --- tests/fish_test_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fish_test_helper.c b/tests/fish_test_helper.c index 4ab23db89..f1af29447 100644 --- a/tests/fish_test_helper.c +++ b/tests/fish_test_helper.c @@ -102,12 +102,12 @@ static void print_stdout_stderr() { static void print_pid_then_sleep() { // On some systems getpid is a long, on others it's an int, let's just cast it. - fprintf(stdout, "%d\n", (long)getpid()); + fprintf(stdout, "%ld\n", (long)getpid()); fflush(NULL); usleep(1000000 / 2); //.5 secs } -static void print_pgrp() { fprintf(stdout, "%d\n", (long)getpgrp()); } +static void print_pgrp() { fprintf(stdout, "%ld\n", (long)getpgrp()); } static void print_fds() { bool needs_space = false;