From f51cea125561a2a080d05d802e8ccb2bb169320b Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Thu, 22 Feb 2018 22:35:30 +0100 Subject: lib: Ignore void return value for gcry_randomize The libgcrypt gcry_randomize function returns void which was returned as an int, which gives warnings on some compilers. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/random.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/random.c b/src/lib/random.c index 5e12cadb..78242f9d 100644 --- a/src/lib/random.c +++ b/src/lib/random.c @@ -56,7 +56,8 @@ int random_buffer(void * buf, #elif defined(HAVE_SYS_RANDOM) return getrandom(buf, len, GRND_NONBLOCK); /* glibc 2.25 */ #elif defined(HAVE_LIBGCRYPT) - return gcry_randomize(buf, len, GCRY_STRONG_RANDOM); + gcry_randomize(buf, len, GCRY_STRONG_RANDOM); + return 0; #elif defined(HAVE_OPENSSL) if (len > 0 && len < INT_MAX) return RAND_bytes((unsigned char *) buf, (int) len); -- cgit v1.2.3