From 81cf1ff6d1ddf04fca7f881791e79461ac657f58 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 10 Sep 2017 22:15:23 +0200 Subject: [PATCH] Use unsigned for loop counters --- src/libsodium/crypto_stream/chacha20/dolbeau/u0.h | 2 +- src/libsodium/crypto_stream/salsa20/xmm6int/u0.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h b/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h index 3312d29b..17c3ff8e 100644 --- a/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h +++ b/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h @@ -7,7 +7,7 @@ if (bytes > 0) { _mm_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3); uint8_t partialblock[64]; - int i; + unsigned int i; x_0 = _mm_loadu_si128((__m128i*) (x + 0)); x_1 = _mm_loadu_si128((__m128i*) (x + 4)); diff --git a/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h b/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h index b6613dbd..b2d41680 100644 --- a/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h +++ b/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h @@ -7,7 +7,7 @@ if (bytes > 0) { __m128i b0, b1, b2, b3, b4, b5, b6, b7; uint8_t partialblock[64]; - int i; + unsigned int i; a0 = diag1; for (i = 0; i < ROUNDS; i += 4) {