diff options
| author | 2025-11-02 01:15:38 +0100 | |
|---|---|---|
| committer | 2025-11-07 14:03:27 +0100 | |
| commit | 27ac4a54713ddff68aa3a73353042f0a1b4acd6c (patch) | |
| tree | e38fe1ca3f21bfad74b57ede621fc73a56658eaa | |
| parent | bd2cb3a953fa8226d6d3805482d9412b3d66e74e (diff) | |
| download | tweetpipe-27ac4a54713ddff68aa3a73353042f0a1b4acd6c.tar.gz | |
Fix warnings in tweetnaclt0.1
| -rw-r--r-- | ext/tweetnacl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/tweetnacl.c b/ext/tweetnacl.c index 8ac0a18..9f72b98 100644 --- a/ext/tweetnacl.c +++ b/ext/tweetnacl.c @@ -53,7 +53,7 @@ sv ts64(u8 *x,u64 u) static int vn(const u8 *x,const u8 *y,int n) { - u32 i,d = 0; + int i,d = 0; FOR(i,n) d |= x[i]^y[i]; return (1 & ((d - 1) >> 8)) - 1; } @@ -120,7 +120,7 @@ int crypto_core_hsalsa20(u8 *out,const u8 *in,const u8 *k,const u8 *c) return 0; } -static const u8 sigma[16] = "expand 32-byte k"; +static const u8 sigma[16] __attribute__ ((nonstring)) = "expand 32-byte k"; int crypto_stream_salsa20_xor(u8 *c,const u8 *m,u64 b,const u8 *n,const u8 *k) { @@ -711,7 +711,8 @@ sv reduce(u8 *r) int crypto_sign(u8 *sm,u64 *smlen,const u8 *m,u64 n,const u8 *sk) { u8 d[64],h[64],r[64]; - i64 i,j,x[64]; + u64 i,j; + i64 x[64]; gf p[4]; crypto_hash(d, sk, 32); @@ -778,7 +779,7 @@ static int unpackneg(gf r[4],const u8 p[32]) int crypto_sign_open(u8 *m,u64 *mlen,const u8 *sm,u64 n,const u8 *pk) { - int i; + u64 i; u8 t[32],h[64]; gf p[4],q[4]; |