Merge the GCC5 and build fix branches.

This fixes all warnings produced by GCC 5, except the ones related to
system functions.  Those could be fixed by including the proper headers,
but it would be better to replace the system-dependent code with
functions from mdport.c.
This commit is contained in:
John "Elwin" Edwards 2016-03-11 19:47:52 -05:00
commit 8df0a6308d
52 changed files with 416 additions and 392 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;

View file

@ -96,7 +96,7 @@ int encread(void *starta, unsigned int size, int inf);
void encwrite(void *starta, unsigned int size, FILE *outf);
void endit(int a);
void endmsg(void);
void extinguish(int (*func)());
void extinguish(void (*func)());
int extras(void);
void fall(struct linked_list *item, bool pr);
bool fallpos(struct coord *pos, struct coord *newpos, bool passages);
@ -105,7 +105,7 @@ bool fight(struct coord *mp, struct object *weap, bool thrown);
struct linked_list *find_mons(int y, int x);
struct linked_list *find_obj(int y, int x);
void fix_stick(struct object *cur);
void fuse(int (*func)(), int arg, int time);
void fuse(void (*func)(), int arg, int time);
void game_err(int a);
void genocide(void);
bool get_dir(void);
@ -140,7 +140,7 @@ bool isatrap(char ch);
bool isring(int hand, int ring);
bool iswearing(int ring);
void killed(struct linked_list *item, bool pr);
void lengthen(int (*func)(), int xtime);
void lengthen(void (*func)(), int xtime);
void lev_mon(void);
void light(struct coord *cp);
void look(bool wakeup);
@ -215,7 +215,7 @@ void setup(void);
char show(int y, int x);
bool showtop(int showname);
void sight(int fromfuse);
void start_daemon(int (*func)(), int arg, int type);
void start_daemon(void (*func)(), int arg, int type);
void status(int fromfuse);
bool step_ok(unsigned char ch);
void stomach(int fromfuse);

View file

@ -531,7 +531,7 @@ char *xcrypt(const char *key, const char *setting);
struct delayed_action {
int d_type;
int (*d_func)();
void (*d_func)();
int d_arg;
int d_time;
};
@ -565,7 +565,7 @@ struct monlev {
struct linked_list {
struct linked_list *l_next;
struct linked_list *l_prev;
char *l_data; /* Various structure pointers */
void *l_data; /* Various structure pointers */
};