diff --git a/examples/client/client.c b/examples/client/client.c index 40dae0d3b..69fb7e31e 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -510,6 +510,7 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port, else { err_sys("wc_InitRng failed"); } + (void)rng; /* for WC_NO_RNG case */ } else { err_sys("Client buffer malloc failed"); diff --git a/tests/api.c b/tests/api.c index 7920afca0..8719fcecc 100644 --- a/tests/api.c +++ b/tests/api.c @@ -20611,6 +20611,9 @@ static int test_wc_RNG_GenerateBlock(void) wc_FreeRng(&rng); + (void)rng; /* for WC_NO_RNG case */ + (void)key; + return ret; } #endif diff --git a/wolfssl/test.h b/wolfssl/test.h index 0a8849c6b..926f1f73e 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -2858,6 +2858,7 @@ static WC_INLINE const char* mymktemp(char *tempfn, int len, int num) tempfn[len] = '\0'; wc_FreeRng(&rng); + (void)rng; /* for WC_NO_RNG case */ return tempfn; } @@ -2973,6 +2974,7 @@ static WC_INLINE word16 GetRandomPort(void) port |= 0xC000; /* Make sure its in the 49152 - 65535 range */ wc_FreeRng(&rng); } + (void)rng; /* for WC_NO_RNG case */ return port; } diff --git a/wolfssl/wolfcrypt/random.h b/wolfssl/wolfcrypt/random.h index 0d8db723c..676cd66a1 100644 --- a/wolfssl/wolfcrypt/random.h +++ b/wolfssl/wolfcrypt/random.h @@ -188,6 +188,7 @@ WOLFSSL_API int wc_RNG_GenerateBlock(WC_RNG*, byte*, word32 sz); WOLFSSL_API int wc_RNG_GenerateByte(WC_RNG*, byte*); WOLFSSL_API int wc_FreeRng(WC_RNG*); #else +#include #define wc_InitRng(rng) NOT_COMPILED_IN #define wc_InitRng_ex(rng, h, d) NOT_COMPILED_IN #define wc_InitRngNonce(rng, n, s) NOT_COMPILED_IN