Mercurial > hg > early-roguelike
diff rogue4/rings.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 | 9535a08ddc39 |
children |
line wrap: on
line diff
--- a/rogue4/rings.c Sat Jan 23 09:35:14 2016 -0500 +++ b/rogue4/rings.c Wed Jan 27 19:41:05 2016 -0500 @@ -14,11 +14,14 @@ #include <string.h> #include "rogue.h" +int gethand(void); + /* * ring_on: * Put a ring on a hand */ -ring_on() +void +ring_on(void) { register THING *obj; register int ring; @@ -88,7 +91,8 @@ * ring_off: * Take off a ring */ -ring_off() +void +ring_off(void) { register int ring; register THING *obj; @@ -125,7 +129,8 @@ * gethand: * Which hand is the hero interested in? */ -gethand() +int +gethand(void) { register int c; @@ -153,8 +158,8 @@ * ring_eat: * How much food does this ring use up? */ -ring_eat(hand) -register int hand; +int +ring_eat(int hand) { if (cur_ring[hand] == NULL) return 0; @@ -186,8 +191,7 @@ * Print ring bonuses */ char * -ring_num(obj) -register THING *obj; +ring_num(THING *obj) { static char buf[5];