Mercurial > hg > early-roguelike
changeset 180:d9e44e18eeec
rogue3: initialize various pointers.
MSVC is afraid they might get used while uninitialized.
author | John "Elwin" Edwards |
---|---|
date | Fri, 31 Jul 2015 15:34:34 -0400 |
parents | c199a15a2c70 |
children | d53b13637783 |
files | rogue3/chase.c rogue3/move.c rogue3/pack.c rogue3/passages.c |
diffstat | 4 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/rogue3/chase.c Thu Jul 23 19:28:12 2015 -0400 +++ b/rogue3/chase.c Fri Jul 31 15:34:34 2015 -0400 @@ -162,7 +162,7 @@ int x, y; int dist, thisdist; struct linked_list *item; - struct object *obj; + struct object *obj = NULL; coord *er = &tp->t_pos; int ch;
--- a/rogue3/move.c Thu Jul 23 19:28:12 2015 -0400 +++ b/rogue3/move.c Fri Jul 31 15:34:34 2015 -0400 @@ -339,7 +339,7 @@ int ch; int ex, ey, nopen = 0; struct linked_list *item; - struct object *obj; + struct object *obj = NULL; static coord ret; /* what we will be returning */ static coord dest;
--- a/rogue3/pack.c Thu Jul 23 19:28:12 2015 -0400 +++ b/rogue3/pack.c Fri Jul 31 15:34:34 2015 -0400 @@ -22,8 +22,8 @@ void add_pack(struct linked_list *item, int silent) { - struct linked_list *ip, *lp; - struct object *obj, *op; + struct linked_list *ip, *lp = NULL; + struct object *obj, *op = NULL; int exact, from_floor; if (item == NULL)
--- a/rogue3/passages.c Thu Jul 23 19:28:12 2015 -0400 +++ b/rogue3/passages.c Fri Jul 31 15:34:34 2015 -0400 @@ -22,7 +22,7 @@ void do_passages() { - struct rdes *r1, *r2; + struct rdes *r1, *r2 = NULL; int i, j; int roomcount; static struct rdes @@ -131,7 +131,7 @@ void conn(int r1, int r2) { - struct room *rpf, *rpt; + struct room *rpf, *rpt = NULL; int rmt; int distance, turn_spot, turn_distance; int rm;