diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-12-26 16:59:32 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-12-26 16:59:32 -0500 |
commit | 0aa2ebbbf39d716dcb84f313aadd85fe06c166dc (patch) | |
tree | 1d59b5c8859648912aa348d6f0f49fc3e93b8218 /simon.cpp | |
parent | 4d9c91b42502c6eedbdeea3def0a6b1d02694027 (diff) | |
download | cryptopp-git-0aa2ebbbf39d716dcb84f313aadd85fe06c166dc.tar.gz |
Clear signed/unsigned warnings with GCC and -Wall -Wextra
Diffstat (limited to 'simon.cpp')
-rw-r--r-- | simon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -53,7 +53,7 @@ inline void SIMON_Encrypt(W c[2], const W p[2], const W k[R]) {
c[0]=p[0]; c[1]=p[1];
- for (size_t i = 0; static_cast<int>(i) < R-1; i += 2)
+ for (int i = 0; i < static_cast<int>(R-1); i += 2)
R2(c[0], c[1], k[i], k[i + 1]);
if (R & 1)
@@ -82,7 +82,7 @@ inline void SIMON_Decrypt(W p[2], const W c[2], const W k[R]) rounds--;
}
- for (size_t i = rounds - 2; static_cast<int>(i) >= 0; i -= 2)
+ for (int i = static_cast<int>(rounds - 2); i >= 0; i -= 2)
R2(p[1], p[0], k[i + 1], k[i]);
}
|