Clear Coverity finding CID 186948

"Logically dead code"
This commit is contained in:
Jeffrey Walton 2018-01-19 18:35:23 -05:00
parent 347c0e56c6
commit 5c5d3e4c26
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -3262,7 +3262,7 @@ bool ValidateEncoder()
// string of '*'. To round trip a string both IsolatedInitialize
// must be called and work correctly.
std::cout << "\nCustom encoder validation running...\n\n";
bool pass1 = true, pass2 = false;
bool pass = true;
int lookup[256];
const char alphabet[64+1] =
@ -3292,10 +3292,10 @@ bool ValidateEncoder()
decoder.Put((const byte*) str1.data(), str1.size());
decoder.MessageEnd();
pass1 = (str1 == std::string(expected)) && pass1;
pass1 = (str2 == std::string(alphabet, 64)) && pass1;
pass = (str1 == std::string(expected)) && pass;
pass = (str2 == std::string(alphabet, 64)) && pass;
std::cout << (pass1 ? "passed:" : "FAILED:");
std::cout << (pass ? "passed:" : "FAILED:");
std::cout << " Encode and decode\n";
// Try forcing an empty message. This is the Monero bug
@ -3315,14 +3315,11 @@ bool ValidateEncoder()
volatile lword size = decoder2.MaxRetrievable();
lword shadow = size;
CRYPTOPP_UNUSED(shadow);
pass2 = true;
}
std::cout << (pass2 ? "passed:" : "FAILED:");
std::cout << " 0-length message\n";
std::cout << "passed: 0-length message\n";
return pass1 && pass2;
return pass;
}
bool ValidateSHACAL2()