* include/grub/crypto.h (grub_crypto_xor): Fix cast-align warning.

This commit is contained in:
Vladimir Serbinenko 2013-12-21 15:35:15 +01:00
parent ae558c2ccf
commit 8a913e664e
2 changed files with 8 additions and 3 deletions

View file

@ -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> 2013-12-21 Vladimir Serbinenko <phcoder@gmail.com>
Enable -Wformat=2 if it's supported. Enable -Wformat=2 if it's supported.

View 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)) while (size >= sizeof (grub_uint64_t))
{ {
*(grub_uint64_t *) outptr /* We've already checked that all pointers are aligned. */
= (*(const grub_uint64_t *) in1ptr *(grub_uint64_t *) (void *) outptr
^ *(const grub_uint64_t *) in2ptr); = (*(const grub_uint64_t *) (const void *) in1ptr
^ *(const grub_uint64_t *) (const void *) in2ptr);
in1ptr += sizeof (grub_uint64_t); in1ptr += sizeof (grub_uint64_t);
in2ptr += sizeof (grub_uint64_t); in2ptr += sizeof (grub_uint64_t);
outptr += sizeof (grub_uint64_t); outptr += sizeof (grub_uint64_t);