Removed unneeded guard

Whitespace check-in
pull/416/head
Jeffrey Walton 2017-05-09 16:23:30 -04:00
parent 3b4a9e2ccf
commit 33235f88db
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 5 additions and 11 deletions

View File

@ -154,7 +154,7 @@ inline void RDRAND32(void* output)
while(!_rdrand32_step(reinterpret_cast<word32*>(output))) {} while(!_rdrand32_step(reinterpret_cast<word32*>(output))) {}
#else #else
// RDRAND not detected at compile time, or no suitable compiler found // RDRAND not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output); CRYPTOPP_UNUSED(output);
throw NotImplemented("RDRAND: failed to find an implementation"); throw NotImplemented("RDRAND: failed to find an implementation");
#endif #endif
} }
@ -196,7 +196,7 @@ inline void RDRAND64(void* output)
while(!_rdrand64_step(reinterpret_cast<unsigned long long*>(output))) {} while(!_rdrand64_step(reinterpret_cast<unsigned long long*>(output))) {}
#else #else
// RDRAND not detected at compile time, or no suitable compiler found // RDRAND not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output); CRYPTOPP_UNUSED(output);
throw NotImplemented("RDRAND: failed to find an implementation"); throw NotImplemented("RDRAND: failed to find an implementation");
#endif #endif
} }
@ -251,7 +251,7 @@ void RDRAND::GenerateBlock(byte *output, size_t size)
} }
#else #else
// RDRAND not detected at compile time, or no suitable compiler found // RDRAND not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output); CRYPTOPP_UNUSED(output);
throw NotImplemented("RDRAND: failed to find a suitable implementation"); throw NotImplemented("RDRAND: failed to find a suitable implementation");
#endif #endif
} }
@ -311,7 +311,7 @@ inline void RDSEED32(void* output)
while(!_rdseed32_step(reinterpret_cast<word32*>(output))) {} while(!_rdseed32_step(reinterpret_cast<word32*>(output))) {}
#else #else
// RDSEED not detected at compile time, or no suitable compiler found // RDSEED not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output); CRYPTOPP_UNUSED(output);
throw NotImplemented("RDSEED: failed to find an implementation"); throw NotImplemented("RDSEED: failed to find an implementation");
#endif #endif
} }
@ -353,7 +353,7 @@ inline void RDSEED64(void* output)
while(!_rdseed64_step(reinterpret_cast<unsigned long long*>(output))) {} while(!_rdseed64_step(reinterpret_cast<unsigned long long*>(output))) {}
#else #else
// RDSEED not detected at compile time, or no suitable compiler found // RDSEED not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output); CRYPTOPP_UNUSED(output);
throw NotImplemented("RDSEED: failed to find an implementation"); throw NotImplemented("RDSEED: failed to find an implementation");
#endif #endif
} }

View File

@ -833,11 +833,8 @@ bool TestRDRAND()
bool entropy = true, compress = true, discard = true, crop = true; bool entropy = true, compress = true, discard = true, crop = true;
member_ptr<RandomNumberGenerator> rng; member_ptr<RandomNumberGenerator> rng;
#ifdef BLOCKING_RNG_AVAILABLE
try {rng.reset(new RDRAND);} try {rng.reset(new RDRAND);}
catch (const RDRAND_Err &) {} catch (const RDRAND_Err &) {}
#endif
if (rng.get()) if (rng.get())
{ {
RDRAND& rdrand = dynamic_cast<RDRAND&>(*rng.get()); RDRAND& rdrand = dynamic_cast<RDRAND&>(*rng.get());
@ -934,11 +931,8 @@ bool TestRDSEED()
bool entropy = true, compress = true, discard = true, crop = true; bool entropy = true, compress = true, discard = true, crop = true;
member_ptr<RandomNumberGenerator> rng; member_ptr<RandomNumberGenerator> rng;
#ifdef BLOCKING_RNG_AVAILABLE
try {rng.reset(new RDSEED);} try {rng.reset(new RDSEED);}
catch (const RDSEED_Err &) {} catch (const RDSEED_Err &) {}
#endif
if (rng.get()) if (rng.get())
{ {
RDSEED& rdseed = dynamic_cast<RDSEED&>(*rng.get()); RDSEED& rdseed = dynamic_cast<RDSEED&>(*rng.get());