Disclaimer: I don't use lclint, I would need to try some samples to be
sure this is correct.  I prefer using both "-Wall -W" options to gcc, 
instead.

  What it seems to me to mean is you declared a function which in a file
named "calc2.c" the function is called "add"... most likely you don't
specify "extern" or "static", since the default is extern and perfectly
reasonable.
  Since it was not declared "static" it is available to any other modules 
you link to this file, but none of them actually call "add"... so lclint 
is suggesting that you change from extern to static... or optionally add
the flag "-exportlocal" to get it to shut up.


int foo(int bar);           /* default to extern, callable outside */

static int foo(int bar);    /* callable only inside modules */

extern int foo(int bar);    /* callable outside module */


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
> 
> -- 
> "The following addresses had permanent fatal errors..."      [EMAIL PROTECTED]
>                                -- Mailer Daemon              www.dirac.org/p

Reply via email to