summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b5b9a85)
raw | patch | inline | side by side (parent: b5b9a85)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 11 Dec 2016 15:15:01 +0000 (16:15 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 11 Dec 2016 15:15:01 +0000 (16:15 +0100) |
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.
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 | patch | blob | history | |
src/daemon/utils_random.h | patch | blob | history |
index d490986dab2d746a07780845d78874de55b65941..77b500fb8faaf17397811069528560b3ea620572 100644 (file)
have_seed = 1;
}
-double cdrand_d() {
+double cdrand_d(void) {
double r;
pthread_mutex_lock(&lock);
return (r);
}
-uint32_t cdrand_u() {
+uint32_t cdrand_u(void) {
long r;
pthread_mutex_lock(&lock);
index e25ae9b67829c4579406e7d96e912f1bcdeab4af..75bdc12e127f6210eae5de1c0f71b95157c61955 100644 (file)
*
* 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
*
* 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.