[COMMITTED] stdio-common: Fix tst-setvbuf2.c on clang-23
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Aug 12 18:21:29 GMT 2026
clang-23 enables -Wunused-but-set-global by default, which flags
variables that are set but never read. Also remove the fstat call,
which was only used to set the removed variable.
---
stdio-common/tst-setvbuf2.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/stdio-common/tst-setvbuf2.c b/stdio-common/tst-setvbuf2.c
index 1c1018796dc..4f880912787 100644
--- a/stdio-common/tst-setvbuf2.c
+++ b/stdio-common/tst-setvbuf2.c
@@ -94,11 +94,6 @@ dumpfp (FILE *fp)
# define dumpfp(FP)
#endif
-#ifndef INDEPENDENT_PART
-/* st_blksize value for that file, or BUFSIZ if out of range. */
-static int blksize = BUFSIZ;
-#endif
-
/* Our test buffer. */
#define TEST_BUFSIZE 42
static int bufsize = TEST_BUFSIZE < BUFSIZ ? TEST_BUFSIZE : BUFSIZ;
@@ -210,10 +205,6 @@ prepare_test_data (void)
debug;
int fd = create_temp_file ("tst-setvbuf2", &test_file_name);
TEST_VERIFY_EXIT (fd != -1);
- struct stat64 st;
- xfstat64 (fd, &st);
- if (st.st_blksize > 0 && st.st_blksize < BUFSIZ)
- blksize = st.st_blksize;
xclose (fd);
}
#endif
--
2.53.0
More information about the Libc-alpha
mailing list