diff arogue7/misc.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
line wrap: on
line diff
--- a/arogue7/misc.c	Tue Aug 11 16:19:04 2015 -0400
+++ b/arogue7/misc.c	Wed Aug 12 15:42:02 2015 -0400
@@ -277,7 +277,7 @@
 register struct linked_list *item;
 {
 
-    register struct linked_list *titem;
+    register struct linked_list *titem = NULL;
     register struct object *obj, *tobj;
     bool doit = TRUE;
 
@@ -838,8 +838,8 @@
 use_mm(which)
 int which;
 {
-    register struct object *obj;
-    register struct linked_list *item;
+    register struct object *obj = NULL;
+    register struct linked_list *item = NULL;
     bool cursed, blessed, is_mm;
 
     cursed = FALSE;