Clear Clang warnings

This commit is contained in:
Jeffrey Walton 2021-03-21 08:06:10 -04:00
parent d8ccda7512
commit ce8d243bf1
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 10 additions and 4 deletions

View File

@ -123,6 +123,7 @@ void AdditiveCipherTemplate<S>::ProcessData(byte *outString, const byte *inStrin
const unsigned int alignment = policy.GetAlignment();
const bool inAligned = IsAlignedOn(inString, alignment);
const bool outAligned = IsAlignedOn(outString, alignment);
CRYPTOPP_UNUSED(inAligned); CRYPTOPP_UNUSED(outAligned);
if (policy.CanOperateKeystream() && length >= bytesPerIteration)
{
@ -266,6 +267,7 @@ void CFB_CipherTemplate<BASE>::ProcessData(byte *outString, const byte *inString
const unsigned int alignment = policy.GetAlignment();
const bool inAligned = IsAlignedOn(inString, alignment);
const bool outAligned = IsAlignedOn(outString, alignment);
CRYPTOPP_UNUSED(inAligned); CRYPTOPP_UNUSED(outAligned);
if (policy.CanIterate() && length >= bytesPerIteration && outAligned)
{

View File

@ -173,13 +173,15 @@ bool ValidateRSA_Encrypt()
RSAES_PKCS1v15_Decryptor rsaPriv(keys);
RSAES_PKCS1v15_Encryptor rsaPub(rsaPriv);
pass = CryptoSystemValidate(rsaPriv, rsaPub) && pass;
fail = !CryptoSystemValidate(rsaPriv, rsaPub);
pass = pass && !fail;
}
{
RSAES<OAEP<SHA1> >::Decryptor rsaPriv(GlobalRNG(), 512);
RSAES<OAEP<SHA1> >::Encryptor rsaPub(rsaPriv);
pass = CryptoSystemValidate(rsaPriv, rsaPub) && pass;
fail = !CryptoSystemValidate(rsaPriv, rsaPub);
pass = pass && !fail;
}
{
const byte plain[] =
@ -287,7 +289,8 @@ bool ValidateLUC_Encrypt()
LUCES_OAEP_SHA_Decryptor priv(GlobalRNG(), 512);
LUCES_OAEP_SHA_Encryptor pub(priv);
pass = CryptoSystemValidate(priv, pub) && pass;
fail = !CryptoSystemValidate(priv, pub);
pass = pass && !fail;
return pass;
}
@ -375,7 +378,8 @@ bool ValidateRabin_Encrypt()
FileSource f(DataDir("TestData/rabi1024.dat").c_str(), true, new HexDecoder);
RabinES<OAEP<SHA1> >::Decryptor priv(f);
RabinES<OAEP<SHA1> >::Encryptor pub(priv);
pass = CryptoSystemValidate(priv, pub) && pass;
fail = !CryptoSystemValidate(priv, pub);
pass = pass && !fail;
return pass;
}