There is no warning when compiling code that calls random() but two 
warnings when compiling code that calls rand() -


: warning: random() may return determinstic values, is that what you
want?warning: rand() may return determinstic values, is that what you want?


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

Reply via email to