Re: Strange Compiler Message

From: Chuck Carson (ccarson@phi.org)
Date: 08/23/99


Yes, it was proto'd.

However, funny as C can be, I moved this function
into the middle of the file (but still after the
call to this function) and it compiled with no
errors.

I have strenuously checked all functions after this
new location for stray }'s and etc... that may have
gone un-noticed to the compiler.

Another sidenote, this file (class.c) takes an extremely
long time to compile compared to the other files. I have
upped my levels to 110 and now have 9 classes so the file
has grown quite large (over 10k lines) But other coding
projects of mine have files this large and larger but
compile in a fraction of the time. (I know the code being
used in the files makes a difference, but just some food
for thought) I can compile every other file in the mud in
the time it takes to compile just class.c now. I have not
monitored my memory when this file is compiling but being
only 64 megs, it may be a bottleneck.

-C



-----Original Message-----
From: Xual [mailto:xual@danathara.dhs.org]
Sent: Monday, August 23, 1999 3:26 PM
To: CIRCLE@post.queensu.ca
Subject: Re:  Strange Compiler Message


On Mon, 23 Aug 1999, Chuck Carson wrote:

> Okay, I will check this gain but I have triple
> checked this code. It is a really simple void
> function, of which I have already added probably
> 10 other to this file that work fine.

You are sure that you prototyped it at the top of the file?  Something like:

void apply_racial_bonuses(whatever arguments it takes);

If you call a function before it appears in the code, the compiler will
assume that it returns an int.  You could probably get away with moving the
function above all calls to it, but the proper method is to prototype it, as
above.
--

"Misery is boundless"
        -Xual the Torturer, on the Eve of the Sundering.

Danathara Online RPG
telnet://danathara.dhs.org:4000


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



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