Hello,

I am very keen to use lclint as a replacement for flexelint but am running
into problems on many of our source files.  The first problem is the
message:

access.c:73: Unrecognized identifier: strdup
  Identifier used in code has not been declared. (-unrecog will suppress
  message)

The code compiles, string.h is included, etc, etc.  The problem happens on
both Solaris 2.6 and Linux.  (I don't want to use -unrecog as I feel it
defeats the purpose).

I'm using version 3.0.0.17 of lclint and gcc 2.95.3 on Solaris but have
seen the same problem on Linux, gcc 2.96 and lclint 2.5r and 3.0.0.17.

The second one is:

/usr/include/arpa/inet.h:52:27: Parse Error: Inconsistent function declaration:
    in_addr_t : extern ?. (For help on parse errors, see lclint -help
    parseerrors.)

That one's on Solaris only but occurs for some other declarations too.

Here's some other info that may be relevant:

command line: lclint -f /fid/dev/lclint.rc access.c

lclint.rc contains:
-D__STDC__=1
-DSYSV
-DSOLARIS2
-D__EXTENSIONS__
-D__sparc
-I/fid/include
-I/usr/include
-I/usr/local/include
+posix-strict-lib

The offending line in access.c is:

        table[i++] = strdup(tmp);

It seems like such a fundamental problem that I feel I must be missing
something.

Thanks in advance

Andrew

Reply via email to