Clear clang-tidy warnings

pull/575/head
Jeffrey Walton 2018-01-24 18:24:53 -05:00
parent 30bcc7022d
commit 4d4c3d92a8
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 7 additions and 5 deletions

View File

@ -327,7 +327,7 @@ void ARIA::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, b
t = UINT32_CAST(outBlock); t = UINT32_CAST(outBlock);
BigEndianBlock::Put(rk, t)(t[0])(t[1])(t[2])(t[3]); BigEndianBlock::Put(rk, t)(t[0])(t[1])(t[2])(t[3]);
#endif #endif // CRYPTOPP_LITTLE_ENDIAN
#if CRYPTOPP_ARM_NEON_AVAILABLE #if CRYPTOPP_ARM_NEON_AVAILABLE
if (HasNEON()) if (HasNEON())

View File

@ -35,7 +35,8 @@ typedef BlockGetAndPut<word32, BigEndian> Block;
void CAST128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const void CAST128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{ {
word32 t, l, r; // TODO: add a SecBlock workspace to the class when the ABI can change
word32 t,l,r;
/* Get inblock into l,r */ /* Get inblock into l,r */
Block::Get(inBlock)(l)(r); Block::Get(inBlock)(l)(r);
@ -65,7 +66,8 @@ void CAST128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
void CAST128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const void CAST128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{ {
word32 t, l, r; // TODO: add a SecBlock workspace to the class when the ABI can change
word32 t,l,r;
/* Get inblock into l,r */ /* Get inblock into l,r */
Block::Get(inBlock)(r)(l); Block::Get(inBlock)(r)(l);
@ -90,8 +92,6 @@ void CAST128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
F1(l, r, 0, 16); F1(l, r, 0, 16);
/* Put l,r into outblock */ /* Put l,r into outblock */
Block::Put(xorBlock, outBlock)(l)(r); Block::Put(xorBlock, outBlock)(l)(r);
/* Wipe clean */
t = l = r = 0;
} }
void CAST128::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &) void CAST128::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &)
@ -213,6 +213,7 @@ the keys are used */
void CAST256::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const void CAST256::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{ {
// TODO: add a SecBlock workspace to the class when the ABI can change
word32 t, block[4]; word32 t, block[4];
Block::Get(inBlock)(block[0])(block[1])(block[2])(block[3]); Block::Get(inBlock)(block[0])(block[1])(block[2])(block[3]);
@ -255,6 +256,7 @@ void CAST256::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength,
{ {
AssertValidKeyLength(keylength); AssertValidKeyLength(keylength);
// TODO: add a SecBlock workspace to the class when the ABI can change
word32 kappa[8]; word32 kappa[8];
GetUserKey(BIG_ENDIAN_ORDER, kappa, 8, userKey, keylength); GetUserKey(BIG_ENDIAN_ORDER, kappa, 8, userKey, keylength);