Blame SOURCES/glibc-rh1505492-unused-12.patch
|
|
147e83 |
commit 9114625bad23441c89eac5a7dcf319a9714ca31f
|
|
|
147e83 |
Author: Joseph Myers <joseph@codesourcery.com>
|
|
|
147e83 |
Date: Thu Nov 27 16:00:08 2014 +0000
|
|
|
147e83 |
|
|
|
147e83 |
Fix dlfcn/failtestmod.c warning.
|
|
|
147e83 |
|
|
|
147e83 |
This patch fixes a "set but not used" warning from
|
|
|
147e83 |
dlfcn/failtestmod.c. A variable is used only to store the return
|
|
|
147e83 |
value from dlsym. As I understand this test, the point is simply to
|
|
|
147e83 |
do a sequence of load / unload operations in a loop, and all that
|
|
|
147e83 |
matters here is that dlsym gets called and returns without crashing,
|
|
|
147e83 |
not what its return value is. So this patch removes the assignment to
|
|
|
147e83 |
a variable.
|
|
|
147e83 |
|
|
|
147e83 |
Tested for x86_64.
|
|
|
147e83 |
|
|
|
147e83 |
* dlfcn/failtestmod.c (constr): Do not store result of dlsym in a
|
|
|
147e83 |
variable.
|
|
|
147e83 |
|
|
|
147e83 |
diff --git a/dlfcn/failtestmod.c b/dlfcn/failtestmod.c
|
|
|
147e83 |
index a03f90b734132d8d..64dadd53ff8ef109 100644
|
|
|
147e83 |
--- a/dlfcn/failtestmod.c
|
|
|
147e83 |
+++ b/dlfcn/failtestmod.c
|
|
|
147e83 |
@@ -8,7 +8,6 @@ __attribute__ ((__constructor__))
|
|
|
147e83 |
constr (void)
|
|
|
147e83 |
{
|
|
|
147e83 |
void *handle;
|
|
|
147e83 |
- void *m;
|
|
|
147e83 |
|
|
|
147e83 |
/* Open the library. */
|
|
|
147e83 |
handle = dlopen (NULL, RTLD_NOW);
|
|
|
147e83 |
@@ -19,7 +18,7 @@ constr (void)
|
|
|
147e83 |
}
|
|
|
147e83 |
|
|
|
147e83 |
/* Get a symbol. */
|
|
|
147e83 |
- m = dlsym (handle, "main");
|
|
|
147e83 |
+ dlsym (handle, "main");
|
|
|
147e83 |
puts ("called dlsym() to get main");
|
|
|
147e83 |
|
|
|
147e83 |
dlclose (handle);
|