Mercurial > hg > early-roguelike
comparison arogue7/command.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 | a0a57cf42810 |
children | f9ef86cf22b2 |
comparison
equal
deleted
inserted
replaced
199:efdbeec0816d | 200:1cd604c827a3 |
---|---|
1076 nameitem(item, mark) | 1076 nameitem(item, mark) |
1077 struct linked_list *item; | 1077 struct linked_list *item; |
1078 bool mark; | 1078 bool mark; |
1079 { | 1079 { |
1080 register struct object *obj; | 1080 register struct object *obj; |
1081 register char **guess, *elsewise; | 1081 register char **guess = NULL, *elsewise = NULL; |
1082 register bool *know; | 1082 register bool *know; |
1083 | 1083 |
1084 if (item == NULL) { | 1084 if (item == NULL) { |
1085 if (mark) item = get_item(pack, "mark", ALL, FALSE, FALSE); | 1085 if (mark) item = get_item(pack, "mark", ALL, FALSE, FALSE); |
1086 else item = get_item(pack, "name", CALLABLE, FALSE, FALSE); | 1086 else item = get_item(pack, "name", CALLABLE, FALSE, FALSE); |