diff options
author | Gaël PORTAY <gael.portay@gmail.com> | 2015-05-02 12:18:22 +0200 |
---|---|---|
committer | Gaël PORTAY <gael.portay@gmail.com> | 2015-05-05 20:39:13 +0200 |
commit | 3e91ec07e464ffc0f039283f6078b34e596b2086 (patch) | |
tree | 4267c71de85604d09236714ee502b5adf527f3cd /libtomcrypt/src/ciphers | |
parent | 6086851fc1d8e0d149d2ec4acd7521f7c5d860ac (diff) |
Fix unused but set variable warnings [-Werror=unused-but-set-variable]
Diffstat (limited to 'libtomcrypt/src/ciphers')
-rw-r--r-- | libtomcrypt/src/ciphers/aes/aes.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libtomcrypt/src/ciphers/aes/aes.c b/libtomcrypt/src/ciphers/aes/aes.c index ee76b24..55f6333 100644 --- a/libtomcrypt/src/ciphers/aes/aes.c +++ b/libtomcrypt/src/ciphers/aes/aes.c @@ -122,9 +122,10 @@ static ulong32 setup_mix2(ulong32 temp) */ int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) { - int i, j; + int i; ulong32 temp, *rk; #ifndef ENCRYPT_ONLY + int j; ulong32 *rrk; #endif LTC_ARGCHK(key != NULL); @@ -148,7 +149,9 @@ int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *s LOAD32H(rk[2], key + 8); LOAD32H(rk[3], key + 12); if (keylen == 16) { + #ifndef ENCRYPT_ONLY j = 44; + #endif for (;;) { temp = rk[3]; rk[4] = rk[0] ^ setup_mix(temp) ^ rcon[i]; @@ -161,7 +164,9 @@ int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *s rk += 4; } } else if (keylen == 24) { + #ifndef ENCRYPT_ONLY j = 52; + #endif LOAD32H(rk[4], key + 16); LOAD32H(rk[5], key + 20); for (;;) { @@ -182,7 +187,9 @@ int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *s rk += 6; } } else if (keylen == 32) { + #ifndef ENCRYPT_ONLY j = 60; + #endif LOAD32H(rk[4], key + 16); LOAD32H(rk[5], key + 20); LOAD32H(rk[6], key + 24); |