diff options
author | noloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2015-07-12 22:24:28 +0000 |
---|---|---|
committer | noloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2015-07-12 22:24:28 +0000 |
commit | 7a0cd59dc76a07ea9c392afc4e83e95467c7348d (patch) | |
tree | 7c4ee4741576104c5a6d3f62723958ba065cad6a | |
parent | 6b3b5dcb6b73810d68c01c90c347465095c4cbcd (diff) | |
download | cryptopp-7a0cd59dc76a07ea9c392afc4e83e95467c7348d.tar.gz |
Cleared signed/unsigned warning on IncrementCounterByOne
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@579 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r-- | misc.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -464,16 +464,16 @@ CRYPTOPP_DLL void CRYPTOPP_API CallNewHandler(); inline void IncrementCounterByOne(byte *inout, unsigned int s) { - for (int i=s-1, carry=1; i>=0 && carry; i--) + for (int i=static_cast<int>(s)-1, carry=1; i>=0 && carry; i--) carry = !++inout[i]; } inline void IncrementCounterByOne(byte *output, const byte *input, unsigned int s) { int i, carry; - for (i=s-1, carry=1; i>=0 && carry; i--) + for (i=static_cast<int>(s)-1, carry=1; i>=0 && carry; i--) carry = ((output[i] = input[i]+1) == 0); - memcpy_s(output, s, input, i+1); + memcpy_s(output, s, input, static_cast<size_t>(i)+1); } template <class T> |