Mercurial > hg > early-roguelike
comparison arogue7/util.c @ 200:1cd604c827a3
Advanced Rogue 7: initialize multiple variables.
MSVC complained that they might be used uninitialized. In some cases,
this might have been possible.
XRogue already has initializations for all these variables.
| author | John "Elwin" Edwards |
|---|---|
| date | Wed, 12 Aug 2015 15:42:02 -0400 |
| parents | b786053d2f37 |
| children | f9ef86cf22b2 |
comparison
equal
deleted
inserted
replaced
| 199:efdbeec0816d | 200:1cd604c827a3 |
|---|---|
| 1004 | 1004 |
| 1005 bool | 1005 bool |
| 1006 move_hero(why) | 1006 move_hero(why) |
| 1007 int why; | 1007 int why; |
| 1008 { | 1008 { |
| 1009 char *action; | 1009 char *action = ""; |
| 1010 char which; | 1010 char which; |
| 1011 coord c; | 1011 coord c; |
| 1012 | 1012 |
| 1013 switch (why) { | 1013 switch (why) { |
| 1014 case H_TELEPORT: | 1014 case H_TELEPORT: |
| 1205 | 1205 |
| 1206 char * | 1206 char * |
| 1207 tr_name(ch) | 1207 tr_name(ch) |
| 1208 char ch; | 1208 char ch; |
| 1209 { | 1209 { |
| 1210 register char *s; | 1210 register char *s = ""; |
| 1211 | 1211 |
| 1212 switch (ch) | 1212 switch (ch) |
| 1213 { | 1213 { |
| 1214 case TRAPDOOR: | 1214 case TRAPDOOR: |
| 1215 s = terse ? "A trapdoor." : "You found a trapdoor."; | 1215 s = terse ? "A trapdoor." : "You found a trapdoor."; |
