[COMMITTED] elf: Fix tst-nodelete-dlclose-dso.c on clang-23
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Aug 12 18:21:58 GMT 2026
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
More information about the Libc-alpha
mailing list