diff options
| author | Keith Packard <keithp@keithp.com> | 2017-12-12 17:59:26 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-12-12 18:09:11 -0800 | 
| commit | ca27d467198c556be483961a6ca3b8f97bbe96a6 (patch) | |
| tree | 239b5ced573d834a1679ed4b2f725c6dfd77bf97 /src/scheme/ao_scheme_save.c | |
| parent | 4bfce37e7567d9c2a09ea4da8113e7639516ed6e (diff) | |
altos/scheme: More compiler warning cleanups
Make local funcs static. Don't mix decls and code.x
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/scheme/ao_scheme_save.c')
| -rw-r--r-- | src/scheme/ao_scheme_save.c | 13 | 
1 files changed, 10 insertions, 3 deletions
| diff --git a/src/scheme/ao_scheme_save.c b/src/scheme/ao_scheme_save.c index af9345b8..3a595d71 100644 --- a/src/scheme/ao_scheme_save.c +++ b/src/scheme/ao_scheme_save.c @@ -17,11 +17,15 @@  ao_poly  ao_scheme_do_save(struct ao_scheme_cons *cons)  { +#ifdef AO_SCHEME_SAVE +	struct ao_scheme_os_save *os; +#endif +  	if (!ao_scheme_check_argc(_ao_scheme_atom_save, cons, 0, 0))  		return AO_SCHEME_NIL;  #ifdef AO_SCHEME_SAVE -	struct ao_scheme_os_save *os = (struct ao_scheme_os_save *) (void *) &ao_scheme_pool[AO_SCHEME_POOL]; +	os = (struct ao_scheme_os_save *) (void *) &ao_scheme_pool[AO_SCHEME_POOL];  	ao_scheme_collect(AO_SCHEME_COLLECT_FULL);  	os->atoms = ao_scheme_atom_poly(ao_scheme_atoms); @@ -38,12 +42,15 @@ ao_scheme_do_save(struct ao_scheme_cons *cons)  ao_poly  ao_scheme_do_restore(struct ao_scheme_cons *cons)  { +#ifdef AO_SCHEME_SAVE +	struct ao_scheme_os_save save; +	struct ao_scheme_os_save *os = (struct ao_scheme_os_save *) (void *) &ao_scheme_pool[AO_SCHEME_POOL]; +#endif  	if (!ao_scheme_check_argc(_ao_scheme_atom_save, cons, 0, 0))  		return AO_SCHEME_NIL;  #ifdef AO_SCHEME_SAVE -	struct ao_scheme_os_save save; -	struct ao_scheme_os_save *os = (struct ao_scheme_os_save *) (void *) &ao_scheme_pool[AO_SCHEME_POOL]; +	os = (struct ao_scheme_os_save *) (void *) &ao_scheme_pool[AO_SCHEME_POOL];  	if (!ao_scheme_os_restore_save(&save, AO_SCHEME_POOL))  		return ao_scheme_error(AO_SCHEME_INVALID, "header restore failed"); | 
