Blame SOURCES/glibc-rh1505492-unused-12.patch

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