From 67fee64f8b90cb72905ac7c0ae40ae5f0a7d2151 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 27 Dec 2011 14:04:28 -0800 Subject: * 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. --- rand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'rand.c') diff --git a/rand.c b/rand.c index 9a48e7e1..02c42c18 100644 --- a/rand.c +++ b/rand.c @@ -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++) { -- cgit v1.2.3