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

Adhemerval Zanella via Glibc-cvs <[email protected]>
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=06659e7cb19d5b06c726c10fd1aa7baf02d41d08

commit 06659e7cb19d5b06c726c10fd1aa7baf02d41d08
Author: Adhemerval Zanella <[email protected]>
Date:   Tue Aug 11 14:14:59 2026 -0300

    stdio-common: Fix tst-setvbuf2.c on clang-23
    
    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.

Diff:
---
 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 1c1018796d..4f88091278 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
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.