From: Vladimir Serbinenko Date: Sat, 21 Dec 2013 14:35:15 +0000 (+0100) Subject: * include/grub/crypto.h (grub_crypto_xor): Fix cast-align warning. X-Git-Tag: grub-2.02-beta2~44 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a913e664eb8bfdcbaa636a289aab9bfa8290479;p=thirdparty%2Fgrub.git * include/grub/crypto.h (grub_crypto_xor): Fix cast-align warning. --- diff --git a/ChangeLog b/ChangeLog index 4a7145c9d..071a5b7e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-12-21 Vladimir Serbinenko + + * include/grub/crypto.h (grub_crypto_xor): Fix cast-align warning. + 2013-12-21 Vladimir Serbinenko Enable -Wformat=2 if it's supported. diff --git a/include/grub/crypto.h b/include/grub/crypto.h index 8055d6d9f..ec1b980d2 100644 --- a/include/grub/crypto.h +++ b/include/grub/crypto.h @@ -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);