]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/crypto.h (grub_crypto_xor): Fix cast-align warning.
authorVladimir Serbinenko <phcoder@gmail.com>
Sat, 21 Dec 2013 14:35:15 +0000 (15:35 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sat, 21 Dec 2013 14:35:15 +0000 (15:35 +0100)
ChangeLog
include/grub/crypto.h

index 4a7145c9d97725a08f3cb53ce572605699f85e1b..071a5b7e5d4b857257a5a1cee60cd707551f13a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-21  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * include/grub/crypto.h (grub_crypto_xor): Fix cast-align warning.
+
 2013-12-21  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Enable -Wformat=2 if it's supported.
index 8055d6d9f79baaaec28b1f3e9073db208df3bc5d..ec1b980d2ec7a6cc457cd085b771f0387c49e5ee 100644 (file)
@@ -293,9 +293,10 @@ grub_crypto_xor (void *out, const void *in1, const void *in2, grub_size_t size)
     }
   while (size >= sizeof (grub_uint64_t))
     {
-      *(grub_uint64_t *) outptr
-       = (*(const grub_uint64_t *) in1ptr
-          ^ *(const grub_uint64_t *) in2ptr);
+      /* We've already checked that all pointers are aligned.  */
+      *(grub_uint64_t *) (void *) outptr
+       = (*(const grub_uint64_t *) (const void *) in1ptr
+          ^ *(const grub_uint64_t *) (const void *) in2ptr);
       in1ptr += sizeof (grub_uint64_t);
       in2ptr += sizeof (grub_uint64_t);
       outptr += sizeof (grub_uint64_t);