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.
This commit is contained in:
John "Elwin" Edwards 2016-01-27 19:41:05 -05:00
parent 384386d71c
commit c1d6a6af6a
32 changed files with 625 additions and 394 deletions

View file

@ -19,15 +19,30 @@
char countch, direction, newcount = FALSE;
void call(void);
void d_level(void);
void help(void);
void identify(void);
void illcom(char ch);
void search(void);
void u_level(void);
#ifdef WIZARD
extern void add_pass(void);
extern void create_obj(void);
extern bool passwd(void);
extern void show_map(void);
#endif
/*
* command:
* Process the user commands
*/
command()
void
command(void)
{
register char ch;
register int ntimes = 1; /* Number of player moves */
char *unctrol();
if (on(player, ISHASTE))
ntimes++;
@ -344,8 +359,8 @@ command()
* illcom:
* What to do with an illegal command
*/
illcom(ch)
char ch;
void
illcom(char ch)
{
save_msg = FALSE;
count = 0;
@ -357,7 +372,8 @@ char ch;
* search:
* Player gropes about him to find hidden things.
*/
search()
void
search(void)
{
register int y, x;
register char *fp;
@ -400,7 +416,8 @@ search()
* help:
* Give single character help, or the whole mess if he wants it
*/
help()
void
help(void)
{
register const struct h_list *strp = helpstr;
register char helpch;
@ -457,7 +474,8 @@ help()
* identify:
* Tell the player what a certain thing is.
*/
identify()
void
identify(void)
{
register char ch;
register const char *str;
@ -502,7 +520,8 @@ identify()
* d_level:
* He wants to go down a level
*/
d_level()
void
d_level(void)
{
if (chat(hero.y, hero.x) != STAIRS)
msg("I see no way down");
@ -517,7 +536,8 @@ d_level()
* u_level:
* He wants to go up a level
*/
u_level()
void
u_level(void)
{
if (chat(hero.y, hero.x) == STAIRS)
if (amulet)
@ -538,7 +558,8 @@ u_level()
* call:
* Allow a user to call a potion, scroll, or ring something
*/
call()
void
call(void)
{
register THING *obj;
register char **guess;