Mercurial > hg > early-roguelike
comparison arogue7/pack.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 | cadff8f047a1 |
children | f9ef86cf22b2 |
comparison
equal
deleted
inserted
replaced
199:efdbeec0816d | 200:1cd604c827a3 |
---|---|
32 bool | 32 bool |
33 add_pack(item, silent, packret) | 33 add_pack(item, silent, packret) |
34 register struct linked_list *item, **packret; | 34 register struct linked_list *item, **packret; |
35 bool silent; | 35 bool silent; |
36 { | 36 { |
37 register struct linked_list *ip, *lp, *ap; | 37 register struct linked_list *ip, *lp = NULL, *ap; |
38 register struct object *obj, *op; | 38 register struct object *obj, *op = NULL; |
39 register bool exact, from_floor; | 39 register bool exact, from_floor; |
40 | 40 |
41 if (packret != NULL) | 41 if (packret != NULL) |
42 *packret = NULL; | 42 *packret = NULL; |
43 | 43 |
574 bool askfirst, showcost; | 574 bool askfirst, showcost; |
575 { | 575 { |
576 reg struct linked_list *item; | 576 reg struct linked_list *item; |
577 reg struct object *obj; | 577 reg struct object *obj; |
578 reg int cnt, pagecnt, ch, och, maxx, curx, confused; | 578 reg int cnt, pagecnt, ch, och, maxx, curx, confused; |
579 struct linked_list *saveitem; | 579 struct linked_list *saveitem = NULL; |
580 char description[2*LINELEN+1]; | 580 char description[2*LINELEN+1]; |
581 char cost[LINELEN/2]; | 581 char cost[LINELEN/2]; |
582 #ifdef PC7300 | 582 #ifdef PC7300 |
583 int menucount = 0; | 583 int menucount = 0; |
584 int usemenu = 1; | 584 int usemenu = 1; |