On 2014/12/17 09:37, Carlin Bingham wrote: > There is no warning when compiling code that calls random() but two > warnings when compiling code that calls rand() -
I noticed this earlier as well. > : warning: random() may return determinstic values, is that what you > want?warning: rand() may return determinstic values, is that what you want? There's a typo in "deterministic" too. > Is the first parameter to __warn_references in random.c supposed to be > 'random' not 'rand'? > > > > Index: lib/libc/stdlib/random.c > =================================================================== > RCS file: /cvs/src/lib/libc/stdlib/random.c,v > retrieving revision 1.26 > diff -u -p -u -r1.26 random.c > --- lib/libc/stdlib/random.c 9 Dec 2014 08:00:53 -0000 1.26 > +++ lib/libc/stdlib/random.c 16 Dec 2014 20:22:12 -0000 > @@ -417,6 +417,6 @@ random(void) > } > > #if defined(APIWARN) > -__warn_references(rand, > +__warn_references(random, > "warning: random() may return determinstic values, is that what you > want?"); > #endif >