Clear C4100 warning (Issue 412)

pull/416/head
Jeffrey Walton 2017-05-09 15:40:49 -04:00
parent a0832a63be
commit f817fc7c2e
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 5 additions and 4 deletions

View File

@ -7,10 +7,6 @@
#include "rdrand.h"
#include "cpu.h"
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4100)
#endif
// This file (and friends) provides both RDRAND and RDSEED. They were added at
// Crypto++ 5.6.3. At compile time, it uses CRYPTOPP_BOOL_{X86|X32|X64}
// to select an implementation or "throw NotImplemented". The class does not
@ -158,6 +154,7 @@ inline void RDRAND32(void* output)
while(!_rdrand32_step(reinterpret_cast<word32*>(output))) {}
#else
// RDRAND not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output);
throw NotImplemented("RDRAND: failed to find an implementation");
#endif
}
@ -199,6 +196,7 @@ inline void RDRAND64(void* output)
while(!_rdrand64_step(reinterpret_cast<unsigned long long*>(output))) {}
#else
// RDRAND not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output);
throw NotImplemented("RDRAND: failed to find an implementation");
#endif
}
@ -253,6 +251,7 @@ void RDRAND::GenerateBlock(byte *output, size_t size)
}
#else
// RDRAND not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output);
throw NotImplemented("RDRAND: failed to find a suitable implementation");
#endif
}
@ -312,6 +311,7 @@ inline void RDSEED32(void* output)
while(!_rdseed32_step(reinterpret_cast<word32*>(output))) {}
#else
// RDSEED not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output);
throw NotImplemented("RDSEED: failed to find an implementation");
#endif
}
@ -353,6 +353,7 @@ inline void RDSEED64(void* output)
while(!_rdseed64_step(reinterpret_cast<unsigned long long*>(output))) {}
#else
// RDSEED not detected at compile time, or no suitable compiler found
CRYPTOPP_UNUSED(output);
throw NotImplemented("RDSEED: failed to find an implementation");
#endif
}