puzzled

From: Brian Williams - Nashak (bmw@efn.org)
Date: 02/21/97


Ok.. I get a warning: 'result' might be used uninitialized..
in do_gen_tog... I changed the switch and all to this:
  if (is_abbrev(argument, "anonymous")) {
    result = PRF_TOG_CHK(ch, PRF_ANONYMOUS);
    subcmd = SCMD_ANONYMOUS;
  }
  else if (is_abbrev(argument, "afk")) {
    result = PRF_TOG_CHK(ch, PRF_AFK);
    subcmd = SCMD_AFK;
  }
  else
    do_toggle(ch, 0, 0, 0);

  if (result)
    send_to_char(tog_messages[subcmd][TOG_ON], ch);
  else
    send_to_char(tog_messages[subcmd][TOG_OFF], ch);
I got the same warning before I put the subcmd = parts in.. thought
that might change it.. still have it though, and I can't see why I'm
getting it.. any ideas? Thanks..

        /---------\      /--------/
       / /XXXXXXX\ \    / ////// /
      / ///XXXXX\\\ \  / ////// /
     / /////XXX\\\\\ \/ ////// /    -=-=-=-=-=-=-=-
    / //////  \\\\\\\  ////// /    Brian Williams
   / ////// /\ \\\\\XXX///// /    bmw@efn.org
  / ////// /  \ \\\XXXXX/// /
 / ////// /    \ \XXXXXXX/ / /\  /_ |_|  /\  |/
/--------/      \---------/ /--\  / | | /--\ |\

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



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