swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re-compiling app with 2.0.1: warnings


From: Marcus G. Daniels
Subject: Re: Re-compiling app with 2.0.1: warnings
Date: 30 Sep 1999 08:43:27 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "FM" == famasce  <address@hidden> writes:

MD> If you have the situation where you want to have a function defined
MD> in a header file, it should be tagged "static" or "static inline"
MD> so that this won't occur. You'll get duplicates, though.

FM> Ok,this was solved ,but it seems to me that gcc doesn't like
FM> anything;now it warns about a 'function defined but not used'.

Do you really need a function *definition* in a header file?  Are you
trying to get something like a macro?  If not, you should just
put a *declaration* in the header file and include that in other files.
A declaration defines the interface, and the definition provides the
mechanism.  You don't want mechanism in header files in most cases.

In this normal case, there will be exactly one function or method definition
(e.g. in a .m or .c file), and but the corresponding header file may
be included many times in various places in the model.




                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]