Mercurial > hg > early-roguelike
diff rogue4/daemon.c @ 215:1b73a8641b37
rogue4: fix most GCC5 warnings.
Converting all function definitions to ANSI style accounts for most of
the change. This has exposed other problems, such as daemons not
actually being their stated type, that will require more careful
solutions.
author | John "Elwin" Edwards |
---|---|
date | Wed, 27 Jan 2016 19:41:05 -0500 |
parents | f2951c4e28d9 |
children | b67b99f6c92b |
line wrap: on
line diff
--- a/rogue4/daemon.c Sat Jan 23 09:35:14 2016 -0500 +++ b/rogue4/daemon.c Wed Jan 27 19:41:05 2016 -0500 @@ -29,7 +29,7 @@ * Find an empty slot in the daemon/fuse list */ struct delayed_action * -d_slot() +d_slot(void) { register int i; register struct delayed_action *dev; @@ -48,8 +48,7 @@ * Find a particular slot in the table */ struct delayed_action * -find_slot(func) -register int (*func)(); +find_slot(int (*func)()) { register int i; register struct delayed_action *dev; @@ -64,8 +63,8 @@ * start_daemon: * Start a daemon, takes a function. */ -start_daemon(func, arg, type) -int (*func)(), arg, type; +void +start_daemon(int (*func)(), int arg, int type) { register struct delayed_action *dev; @@ -80,8 +79,8 @@ * kill_daemon: * Remove a daemon from the list */ -kill_daemon(func) -int (*func)(); +void +kill_daemon(int (*func)()) { register struct delayed_action *dev; @@ -98,8 +97,8 @@ * Run all the daemons that are active with the current flag, * passing the argument to the function. */ -do_daemons(flag) -register int flag; +void +do_daemons(int flag) { register struct delayed_action *dev; @@ -118,8 +117,8 @@ * fuse: * Start a fuse to go off in a certain number of turns */ -fuse(func, arg, time, type) -int (*func)(), arg, time, type; +void +fuse(int (*func)(), int arg, int time, int type) { register struct delayed_action *wire; @@ -134,9 +133,8 @@ * lengthen: * Increase the time until a fuse goes off */ -lengthen(func, xtime) -int (*func)(); -int xtime; +void +lengthen(int (*func)(), int xtime) { register struct delayed_action *wire; @@ -149,8 +147,8 @@ * extinguish: * Put out a fuse */ -extinguish(func) -int (*func)(); +void +extinguish(int (*func)()) { register struct delayed_action *wire; @@ -163,8 +161,8 @@ * do_fuses: * Decrement counters and start needed fuses */ -do_fuses(flag) -register int flag; +void +do_fuses(int flag) { register struct delayed_action *wire;