Daemons and fuses now return void.

Functions for starting and stopping daemons and fuses now expect the
type 'void (*func)()'.  Only a few functions in XRogue needed to be
modified to fit.  Determining the type of the argument is left for a
later date.

Building with GCC5 should now produce less than 200 lines of warnings
per game.
This commit is contained in:
John "Elwin" Edwards 2016-03-05 20:49:37 -05:00
parent 6dfde944f0
commit 0a354903e0
14 changed files with 91 additions and 96 deletions

View file

@ -34,7 +34,7 @@ struct delayed_action d_list[MAXDAEMONS] = {
* Insert a function in the daemon list.
*/
struct delayed_action *
d_insert(int (*func)(), int arg, int type, int time)
d_insert(void (*func)(), int arg, int type, int time)
{
reg struct delayed_action *dev;
@ -72,7 +72,7 @@ d_delete(struct delayed_action *wire)
* Find a particular slot in the table
*/
struct delayed_action *
find_slot(int (*func)())
find_slot(void (*func)())
{
reg struct delayed_action *dev;
@ -87,7 +87,7 @@ find_slot(int (*func)())
* Start a daemon, takes a function.
*/
void
start_daemon(int (*func)(), int arg, int type)
start_daemon(void (*func)(), int arg, int type)
{
d_insert(func, arg, type, DAEMON);
}
@ -112,7 +112,7 @@ do_daemons(int flag)
* Start a fuse to go off in a certain number of turns
*/
void
fuse(int (*func)(), int arg, int time)
fuse(void (*func)(), int arg, int time)
{
d_insert(func, arg, AFTER, time);
}
@ -122,7 +122,7 @@ fuse(int (*func)(), int arg, int time)
* Increase the time until a fuse goes off
*/
void
lengthen(int (*func)(), int xtime)
lengthen(void (*func)(), int xtime)
{
reg struct delayed_action *wire;
@ -136,7 +136,7 @@ lengthen(int (*func)(), int xtime)
* Put out a fuse. Find all such fuses and kill them.
*/
void
extinguish(int (*func)())
extinguish(void (*func)())
{
reg struct delayed_action *dev;