@@ -251,7 +251,7 @@ static void Strengthen(const unsigned char (&seed)[32], SteadyClock::duration du
251
251
/* * Fallback: get 32 bytes of system entropy from /dev/urandom. The most
252
252
* compatible way to get cryptographic randomness on UNIX-ish platforms.
253
253
*/
254
- static void GetDevURandom (unsigned char *ent32)
254
+ [[maybe_unused]] static void GetDevURandom (unsigned char *ent32)
255
255
{
256
256
int f = open (" /dev/urandom" , O_RDONLY);
257
257
if (f == -1 ) {
@@ -310,14 +310,10 @@ void GetOSRand(unsigned char *ent32)
310
310
The function call is always successful.
311
311
*/
312
312
arc4random_buf (ent32, NUM_OS_RANDOM_BYTES);
313
- // Silence a compiler warning about unused function.
314
- (void )GetDevURandom;
315
313
#elif defined(HAVE_GETENTROPY_RAND) && defined(MAC_OSX)
316
314
if (getentropy (ent32, NUM_OS_RANDOM_BYTES) != 0 ) {
317
315
RandFailure ();
318
316
}
319
- // Silence a compiler warning about unused function.
320
- (void )GetDevURandom;
321
317
#elif defined(HAVE_SYSCTL_ARND)
322
318
/* FreeBSD, NetBSD and similar. It is possible for the call to return less
323
319
* bytes than requested, so need to read in a loop.
@@ -331,8 +327,6 @@ void GetOSRand(unsigned char *ent32)
331
327
}
332
328
have += len;
333
329
} while (have < NUM_OS_RANDOM_BYTES);
334
- // Silence a compiler warning about unused function.
335
- (void )GetDevURandom;
336
330
#else
337
331
/* Fall back to /dev/urandom if there is no specific method implemented to
338
332
* get system entropy for this OS.
0 commit comments