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

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