diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-27 14:04:28 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-27 14:04:28 -0800 |
commit | 67fee64f8b90cb72905ac7c0ae40ae5f0a7d2151 (patch) | |
tree | 305f22c82869a5665edf483280af871d7aa12944 | |
parent | 7cf7504c7baa1270fb85c3b03e58f0ede82daea1 (diff) | |
download | txr-67fee64f8b90cb72905ac7c0ae40ae5f0a7d2151.tar.gz txr-67fee64f8b90cb72905ac7c0ae40ae5f0a7d2151.tar.bz2 txr-67fee64f8b90cb72905ac7c0ae40ae5f0a7d2151.zip |
* rand.c (make_state): Use ANSI C syntax for prototyped function of no
arguments. This snuck through due to working with a C++ compiler.
(random): Fixed unused variable warning that happens on 32-bit-pointer
platforms.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | rand.c | 3 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2011-12-27 Kaz Kylheku <kaz@kylheku.com> + + * rand.c (make_state): Use ANSI C syntax for prototyped function of no + arguments. This snuck through due to working with a C++ compiler. + (random): Fixed unused variable warning that happens on 32-bit-pointer + platforms. + 2011-12-25 Kaz Kylheku <kaz@kylheku.com> * txr.1: Formatting fixes. @@ -69,7 +69,7 @@ static struct cobj_ops random_state_ops = { cobj_hash_op }; -static val make_state() +static val make_state(void) { struct random_state *r = (struct random_state *) chk_malloc(sizeof *r); return cobj((mem_t *) r, random_state_s, &random_state_ops); @@ -218,7 +218,6 @@ val random(val state, val modulus) goto invalid; for (;;) { cnum out = 0; - int i; #if SIZEOF_PTR >= 8 for (i = 0; i < rands_needed; i++) { |