[PATCH 3/4] scrypt: fix compiler warnings on ARM
Jussi Kivilinna
jussi.kivilinna at iki.fi
Tue Dec 23 16:36:31 CET 2014
* cipher/scrypt.c (_scryptBlockMix): Cast X to 'u32 *' through 'void *'.
--
Patch fixes 'cast increases required alignment' warnings seen on GCC:
scrypt.c: In function '_scryptBlockMix':
scrypt.c:145:22: warning: cast increases required alignment of target type [-Wcast-align]
_salsa20_core ((u32*)X, (u32*)X, 8);
^
scrypt.c:145:31: warning: cast increases required alignment of target type [-Wcast-align]
_salsa20_core ((u32*)X, (u32*)X, 8);
^
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
cipher/scrypt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cipher/scrypt.c b/cipher/scrypt.c
index 404943d..aca903d 100644
--- a/cipher/scrypt.c
+++ b/cipher/scrypt.c
@@ -142,7 +142,7 @@ _scryptBlockMix (u32 r, unsigned char *B, unsigned char *tmp2)
buf_xor(X, X, &B[i * 64], 64);
/* X = Salsa (T) */
- _salsa20_core ((u32*)X, (u32*)X, 8);
+ _salsa20_core ((u32*)(void*)X, (u32*)(void*)X, 8);
/* Y[i] = X */
memcpy (&Y[i * 64], X, 64);
More information about the Gcrypt-devel
mailing list