Mercurial > hg > early-roguelike
diff rogue4/things.c @ 239:837044d2c362
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.
author | John "Elwin" Edwards |
---|---|
date | Fri, 11 Mar 2016 19:47:52 -0500 |
parents | 2dcf10d45d5b |
children | ded75a57405c |
line wrap: on
line diff
--- a/rogue4/things.c Tue Mar 08 19:45:41 2016 -0500 +++ b/rogue4/things.c Fri Mar 11 19:47:52 2016 -0500 @@ -438,11 +438,11 @@ if (ch == '*') { print_disc(POTION); - add_line(""); + add_line("", NULL); print_disc(SCROLL); - add_line(""); + add_line("", NULL); print_disc(RING); - add_line(""); + add_line("", NULL); print_disc(STICK); end_line(); } @@ -505,7 +505,7 @@ num_found++; } if (num_found == 0) - add_line(nothing(type)); + add_line(nothing(type), NULL); } /* @@ -533,9 +533,8 @@ * add_line: * Add a line to the list of discoveries */ -/* VARARGS1 */ -add_line(fmt, arg) -char *fmt, *arg; +void +add_line(char *fmt, char *arg) { if (line_cnt == 0) { @@ -545,7 +544,7 @@ } if (slow_invent) { - if (*fmt != '\0') + if (fmt != NULL && *fmt != '\0') msg(fmt, arg); line_cnt++; } @@ -575,7 +574,8 @@ * end_line: * End the list of lines */ -end_line() +void +end_line(void) { if (!slow_invent) if (line_cnt == 1 && !newpage) @@ -584,7 +584,7 @@ msg(lastfmt, lastarg); } else - add_line(NULL); + add_line(NULL, NULL); line_cnt = 0; newpage = FALSE; }