l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
July 21: Defensive computing: Information security for individuals
Next Installfest:
TBD
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2001 Dec 30 17:07

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] lclint error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] lclint error?



On Tue, Aug 07, 2001 at 02:51:21PM -0700, Peter Jay Salzman wrote:
> does anyone know what this error message means:
> 
> % lclint calc2.c 
> LCLint 2.4b --- 18 Apr 98
> 
> calc2.c:3:8: Function exported but not used outside calc2: add
>   A declaration is exported, but not used outside this module. Declaration
>   can use static qualifier. (-exportlocal will suppress message)
>    calc2.c:45:1: Definition of add
> 
> Finished LCLint checking --- 1 code error found
> 
> 
> thanks,
> pete

I believe it's saying that the function has external linkage, but
doesn't seem to be used from within some other foo.c, so the external
linkage is unnecessary, in which case you should consider switching to
internal linkage (via the use of the "static" keyword).

If the error doesn't apply to your case (only checking one file at a
time, building a library, etc.), you should silence the warning.  Most
lint programs need to be "tuned" to your specific needs.

FWIW, someone on comp.lang.c recently was complaining that lclint
complains about things it shouldn't, and doesn't complain about things
it should (not that lint is topical for c.l.c.)...  I haven't had a
chance to evaluate it yet.

Micah


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!