[PATCH 1/2] poly1305: silence compiler warning on clang/aarch64

Jussi Kivilinna jussi.kivilinna at iki.fi
Wed Mar 28 19:53:17 CEST 2018


* cipher/poly1305.c (MUL_MOD_1305_64): cast zero constant to 64-bits.
--

This patch fixes "value size does not match register size specified
by the constraint and modifier [-Wasm-operand-widths]" warnings when
building with clang/aarch64.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 0 files changed

diff --git a/cipher/poly1305.c b/cipher/poly1305.c
index 68d9b9015..571f82862 100644
--- a/cipher/poly1305.c
+++ b/cipher/poly1305.c
@@ -130,7 +130,7 @@ static void poly1305_init (poly1305_context_t *ctx,
     /* carry propagation */ \
     H2 = H0 & 3; \
     H0 = (H0 >> 2) * 5; /* msb mod 2^130-5 */ \
-    ADD_1305_64(H2, H1, H0, 0, x0_hi, x0_lo); \
+    ADD_1305_64(H2, H1, H0, (u64)0, x0_hi, x0_lo); \
   } while (0)
 
 unsigned int




More information about the Gcrypt-devel mailing list