For this problem:
act_wiz2.c: In function `do_fremove':
act_wiz2.c:80: warning: implicit declaration of function
`remove_obj'

Place this at the top of act_wiz2.c, anywhere convenient:

bool remove_obj args ((CHAR_DATA * ch, int iWear, bool fReplace));

As for the rest, Angel of Death has explained those.  When you define them, do
int somevariable = 0; instead of int somevariable;

I believe* that GCC issues "may be used uninitialized" warnings when you have
statements
that do not guarantee the declared variable to be given a value.  For example**:

char buf[MIL];

if (IS_VALID(obj))
   strcpy (buf, "Valid object\n\r");

send_to_char(buf, ch);

This will result in a "may be used uninitialized" warning because, obviously,
buf may be used
uninitialized if the object isn't valid.  When you use multiple if statements to
assign data, there's
always the chance that you may've not thought of some combination before using
the variable, and,
hence, it will be used uninitialized.  GCC is much smarter though :-)

- Jeremy

*I may be wrong or only partially right.
**I should probably test this to see if this infact gives "uninitialized"
warnings.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, August 06, 2002 11:12 AM
Subject: Warnings...


> Ok, here are some warnings I am getting. I don't know if
> I need to worry about these or not:
>
> act_wiz2.c: In function `do_fremove':
> act_wiz2.c:80: warning: implicit declaration of function
> `remove_obj'
> act_wiz2.c: In function `do_arealinks':
> act_wiz2.c:90: warning: `buffer' might be used
> uninitialized in this function
> fight.c: In function `dam_message':
> fight.c:2052: warning: `attack' might be used
> uninitialized in this function
>
> I didn't want to spam with the code, so I didn't put any
> code in. I would appreciate it if someone could either
> tell me how to solve these myself, or with any idea on
> how to fix it. If this is something you need the code in
> order to fix, let me know.
>
> Xanth
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom


Reply via email to