[COMMITTED] elf: Fix tst-nodelete-dlclose-dso.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.
---
 elf/tst-nodelete-dlclose-dso.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/elf/tst-nodelete-dlclose-dso.c b/elf/tst-nodelete-dlclose-dso.c
index 252858e6c98..45bffc825ed 100644
--- a/elf/tst-nodelete-dlclose-dso.c
+++ b/elf/tst-nodelete-dlclose-dso.c
@@ -29,8 +29,6 @@
 
 /* Plugin to load.  */
 static void *plugin_lib = NULL;
-/* Plugin function.  */
-static void (*plugin_func) (void);
 #define LIB_PLUGIN "tst-nodelete-dlclose-plugin.so"
 
 /* This function is never called but the plugin references it.
@@ -55,7 +53,7 @@ primary (void)
     }
   dlerror ();
 
-  plugin_func = (void (*) (void)) dlsym (plugin_lib, "plugin_func");
+  dlsym (plugin_lib, "plugin_func");
   error = dlerror ();
   if (error != NULL)
     {
-- 
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.