Clear C4100 warning (Issue 412)
parent
a0832a63be
commit
f817fc7c2e
|
|
@ -7,10 +7,6 @@
|
||||||
#include "rdrand.h"
|
#include "rdrand.h"
|
||||||
#include "cpu.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
|
// 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}
|
// 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
|
// 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))) {}
|
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);
|
||||||
throw NotImplemented("RDRAND: failed to find an implementation");
|
throw NotImplemented("RDRAND: failed to find an implementation");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -199,6 +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);
|
||||||
throw NotImplemented("RDRAND: failed to find an implementation");
|
throw NotImplemented("RDRAND: failed to find an implementation");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -253,6 +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);
|
||||||
throw NotImplemented("RDRAND: failed to find a suitable implementation");
|
throw NotImplemented("RDRAND: failed to find a suitable implementation");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -312,6 +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);
|
||||||
throw NotImplemented("RDSEED: failed to find an implementation");
|
throw NotImplemented("RDSEED: failed to find an implementation");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -353,6 +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);
|
||||||
throw NotImplemented("RDSEED: failed to find an implementation");
|
throw NotImplemented("RDSEED: failed to find an implementation");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue