[COMMITTED] stdio-common: Fix tst-setvbuf2.c on clang-23

Adhemerval Zanella <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.