Re: A few errors.

From: Erik (
Date: 07/20/96

  The compiler is warning you that your code might call those variables,
without anything being stored in them. Most likely, you will crash if that
happens. In some cases, its safe to assign NULL or 0 or NOWHERE to them, 
when you declare them. In the case of structs though, its best to add traps,
  if (!vict)
Perhaps even logging it, so you know when and why you called a function with
no one around.

On Sat, 20 Jul 1996, Matthew Ritchey wrote:

> 	Ok, I am not a great coder, but I do have a mud and would like to 
> know how to correct the following error.  I get why I get the error 
> sorta, but don't know how to correct it.
> act.wizard.c: In function 'do_restore':
> act.wizard.c:1424: warning: 'vict' may be used uninitialized in this function
> act.wizard.c: In function 'do_olist':
> act.wizard.c:2963: warning: 'zone' may be used uninitialized in this function
> I get the uninitialized error about 4 more times during the compile. 
> Anyone have any suggestions?
> -Claw

This archive was generated by hypermail 2b30 : 12/07/00 PST