Hi!

The following patch fixes a warning in libmpx:
../../../../libmpx/mpxwrap/mpx_wrappers.c:492:8: warning: assignment discards 
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     *d = *s;
        ^

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2016-01-17  Jakub Jelinek  <ja...@redhat.com>

        * mpxwrap/mpx_wrappers.c (__mpx_wrapper_memmove): Avoid
        -Wdiscarded-qualifiers warning.  Fix up formatting.

--- libmpx/mpxwrap/mpx_wrappers.c.jj    2015-12-31 01:11:17.000000000 +0100
+++ libmpx/mpxwrap/mpx_wrappers.c       2016-01-16 10:37:54.488048781 +0100
@@ -486,12 +486,12 @@ __mpx_wrapper_memmove (void *dst, const
   /* When we copy exactly one pointer it is faster to
      just use bndldx + bndstx.  */
   if (n == sizeof (void *))
-  {
-    const void **s = (const void**)src;
-    void **d = (void**)dst;
-    *d = *s;
-    return dst;
-  }
+    {
+      void *const *s = (void *const *) src;
+      void **d = (void **) dst;
+      *d = *s;
+      return dst;
+    }
 
   memmove (dst, src, n);
 


        Jakub

Reply via email to