mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-13 08:02:56 +00:00
Address warning about unused gather_time_entropy (#84)
.. with HAVE_ARC4RANDOM and/or HAVE_ARC4RANDOM_BUF defined
This commit is contained in:
parent
7eb3cbcec6
commit
9a1ede8d14
1 changed files with 5 additions and 1 deletions
|
@ -839,6 +839,8 @@ writeRandomBytes_RtlGenRandom(void * target, size_t count) {
|
|||
#endif /* _WIN32 */
|
||||
|
||||
|
||||
#if ! defined(HAVE_ARC4RANDOM_BUF) && ! defined(HAVE_ARC4RANDOM)
|
||||
|
||||
static unsigned long
|
||||
gather_time_entropy(void)
|
||||
{
|
||||
|
@ -863,6 +865,9 @@ gather_time_entropy(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif /* ! defined(HAVE_ARC4RANDOM_BUF) && ! defined(HAVE_ARC4RANDOM) */
|
||||
|
||||
|
||||
static unsigned long
|
||||
ENTROPY_DEBUG(const char * label, unsigned long entropy) {
|
||||
const char * const EXPAT_ENTROPY_DEBUG = getenv("EXPAT_ENTROPY_DEBUG");
|
||||
|
@ -881,7 +886,6 @@ generate_hash_secret_salt(XML_Parser parser)
|
|||
unsigned long entropy;
|
||||
(void)parser;
|
||||
#if defined(HAVE_ARC4RANDOM_BUF)
|
||||
(void)gather_time_entropy;
|
||||
arc4random_buf(&entropy, sizeof(entropy));
|
||||
return ENTROPY_DEBUG("arc4random_buf", entropy);
|
||||
#elif defined(HAVE_ARC4RANDOM)
|
||||
|
|
Loading…
Add table
Reference in a new issue