]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix aliasing violation in tst-rec-dlopen
authorFlorian Weimer <fweimer@redhat.com>
Tue, 15 Dec 2015 08:49:17 +0000 (09:49 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 15 Dec 2015 10:48:27 +0000 (11:48 +0100)
ChangeLog
dlfcn/tst-rec-dlopen.c

index aadde3fc342b9c8afbcf207e9a6a9736a75de022..3b1750cbeb05992135af8d08889315d06e7e064e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-15  Florian Weimer  <fweimer@redhat.com>
+
+       * dlfcn/tst-rec-dlopen.c (call_func): Cast dlsym result, fixing an
+       aliasing violation.
+
 2015-12-14  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #18472]
index 01353fbc86806b0d07f0ae22466bd1696983d5dc..1ab7aa91aac9677901995efa0c5d61e077a20c41 100644 (file)
@@ -57,7 +57,7 @@ call_func (const char *dso_name, const char *func_name)
   dlerror ();
 
   /* Lookup func.  */
-  *(void **) (&func) = dlsym (dso, func_name);
+  func = (int (*) (void)) dlsym (dso, func_name);
   if (func == NULL)
     {
       err = dlerror ();