Clear C4267: 'argument': conversion from 'size_t' to 'unsigned int'
rijndael-simd.cpp(318): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data [C:\projects\cryptopp\cryptlib.vcxproj]
rijndael-simd.cpp(376): note: see reference to function template instantiation 'size_t CryptoPP::Rijndael_AdvancedProcessBlocks_AESNI<void(__cdecl *)(__m128i &,const __m128i *,unsigned int),void(__cdecl *)(__m128i &,__m128i &,__m128i &,__m128i &,const __m128i *,unsigned int)>(F1,F4,const __m128i *,::size_t,const CryptoPP::byte *,const CryptoPP::byte *,CryptoPP::byte *,::size_t,CryptoPP::word32)' being compiled
with
[
F1=void (__cdecl *)(__m128i &,const __m128i *,unsigned int),
F4=void (__cdecl *)(__m128i &,__m128i &,__m128i &,__m128i &,const __m128i *,unsigned int)
]
rijndael-simd.cpp(355): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
pull/461/head
parent
d402099e81
commit
9e5fbbe2e0
|
|
@ -315,7 +315,7 @@ inline size_t Rijndael_AdvancedProcessBlocks_AESNI(F1 func1, F4 func4,
|
|||
xorBlocks += xorIncrement;
|
||||
}
|
||||
|
||||
func4(block0, block1, block2, block3, subkeys, rounds);
|
||||
func4(block0, block1, block2, block3, subkeys, static_cast<unsigned int>(rounds));
|
||||
|
||||
if (xorBlocks && !(flags & BlockTransformation::BT_XorInput))
|
||||
{
|
||||
|
|
@ -352,7 +352,7 @@ inline size_t Rijndael_AdvancedProcessBlocks_AESNI(F1 func1, F4 func4,
|
|||
if (flags & BlockTransformation::BT_InBlockIsCounter)
|
||||
const_cast<byte *>(inBlocks)[15]++;
|
||||
|
||||
func1(block, subkeys, rounds);
|
||||
func1(block, subkeys, static_cast<unsigned int>(rounds));
|
||||
|
||||
if (xorBlocks && !(flags & BlockTransformation::BT_XorInput))
|
||||
block = _mm_xor_si128(block, _mm_loadu_si128((const __m128i *)(const void *)xorBlocks));
|
||||
|
|
|
|||
Loading…
Reference in New Issue