From d49f165f0dd3f1d753c3c0f4c777ef9d85594841 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 25 Nov 2018 15:59:00 -0500 Subject: [PATCH] fixed build warning --- libi2pd/Crypto.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libi2pd/Crypto.h b/libi2pd/Crypto.h index 7f44195a..6accdaa0 100644 --- a/libi2pd/Crypto.h +++ b/libi2pd/Crypto.h @@ -140,18 +140,12 @@ namespace crypto : "%xmm0", "%xmm1", "memory" ); #else - // if not we always can cast to uint64_t * - ((uint64_t *)buf)[0] ^= ((uint64_t *)other.buf)[0]; - ((uint64_t *)buf)[1] ^= ((uint64_t *)other.buf)[1]; + // if not we always can cast to uint32_t * + for (int i = 0; i < 4; i++) + reinterpret_cast(buf)[i] ^= reinterpret_cast(buf)[i]; #endif } } - else if (!(((size_t)buf | (size_t)other.buf) & 0x03)) // multiple of 4 ? - { - // we are good to cast to uint32_t * - for (int i = 0; i < 4; i++) - ((uint32_t *)buf)[i] ^= ((uint32_t *)other.buf)[i]; - } else { for (int i = 0; i < 16; i++)