Mercurial > hg > early-roguelike
comparison rogue3/passages.c @ 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 | 527e2150eaf0 | 
| children | e52a8a7ad4c5 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 172:c199a15a2c70 | 180:d9e44e18eeec | 
|---|---|
| 20 */ | 20 */ | 
| 21 | 21 | 
| 22 void | 22 void | 
| 23 do_passages() | 23 do_passages() | 
| 24 { | 24 { | 
| 25 struct rdes *r1, *r2; | 25 struct rdes *r1, *r2 = NULL; | 
| 26 int i, j; | 26 int i, j; | 
| 27 int roomcount; | 27 int roomcount; | 
| 28 static struct rdes | 28 static struct rdes | 
| 29 { | 29 { | 
| 30 bool conn[MAXROOMS]; /* possible to connect to room i? */ | 30 bool conn[MAXROOMS]; /* possible to connect to room i? */ | 
| 129 */ | 129 */ | 
| 130 | 130 | 
| 131 void | 131 void | 
| 132 conn(int r1, int r2) | 132 conn(int r1, int r2) | 
| 133 { | 133 { | 
| 134 struct room *rpf, *rpt; | 134 struct room *rpf, *rpt = NULL; | 
| 135 int rmt; | 135 int rmt; | 
| 136 int distance, turn_spot, turn_distance; | 136 int distance, turn_spot, turn_distance; | 
| 137 int rm; | 137 int rm; | 
| 138 int direc; | 138 int direc; | 
| 139 coord pdelta, curr, turn_delta, spos, epos; | 139 coord pdelta, curr, turn_delta, spos, epos; | 
