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.
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);
*
* 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.