From 7d8948f9d931d8acb3da197c5317a9f382657cd7 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 11 Dec 2016 16:15:01 +0100 Subject: [PATCH] utils_random.{c,h}: fix build warning utils_random.c:53:8: warning: no previous prototype for function 'cdrand_d' [-Wmissing-prototypes] double cdrand_d() { ^ ./utils_random.h:32:8: note: this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function double cdrand_d(); ^ void utils_random.c:64:10: warning: no previous prototype for function 'cdrand_u' [-Wmissing-prototypes] uint32_t cdrand_u() { ^ ./utils_random.h:40:10: note: this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function uint32_t cdrand_u(); ^ void 2 warnings generated. --- src/daemon/utils_random.c | 4 ++-- src/daemon/utils_random.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/daemon/utils_random.c b/src/daemon/utils_random.c index d490986d..77b500fb 100644 --- a/src/daemon/utils_random.c +++ b/src/daemon/utils_random.c @@ -50,7 +50,7 @@ static void cdrand_seed(void) { have_seed = 1; } -double cdrand_d() { +double cdrand_d(void) { double r; pthread_mutex_lock(&lock); @@ -61,7 +61,7 @@ double cdrand_d() { return (r); } -uint32_t cdrand_u() { +uint32_t cdrand_u(void) { long r; pthread_mutex_lock(&lock); diff --git a/src/daemon/utils_random.h b/src/daemon/utils_random.h index e25ae9b6..75bdc12e 100644 --- a/src/daemon/utils_random.h +++ b/src/daemon/utils_random.h @@ -29,7 +29,7 @@ * * This function is thread- and reentrant-safe. */ -double cdrand_d(); +double cdrand_d(void); /** * cdrand_u returns a random uint32_t value uniformly distributed in the range @@ -37,7 +37,7 @@ double cdrand_d(); * * This function is thread- and reentrant-safe. */ -uint32_t cdrand_u(); +uint32_t cdrand_u(void); /** * Returns a random long between min and max, inclusively. -- 2.30.2