Re: A few errors.

From: Brian Pape (bpape@ezl.com)
Date: 07/20/96


> 	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

it means you are using the variable without assigning it a value that the
compiler is able to determine will happen before you use the variable...

int blah(void){
  int i;
  printf("%d",i);
}

you are using i, but not assigning it a value...  since this is the cause
of many logic errors, and with uninitialized pointers as above, it's
likely to crash the program.

Taran.
Reign of Towers
bpape@ezl.com



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