Try running lint first (perhaps with the -a
, -c
, -h
, -p
and/or
other options). Many C compilers are really only half-
compilers, electing not to diagnose numerous source code
difficulties which would not actively preclude code generation.
malloc
?
The problem is that traditional versions of lint do not know,
and cannot be told, that malloc
"returns a pointer to space
suitably aligned for storage of any type of object." It is
possible to provide a pseudoimplementation of malloc
, using a
#define
inside of #ifdef lint
, which effectively shuts this
warning off, but a simpleminded #definition will also suppress
meaningful messages about truly incorrect invocations. It may
be easier simply to ignore the message, perhaps in an automated
way with grep -v
.
A product called FlexeLint is available (in "shrouded source form," for compilation on 'most any system) from
Gimpel Software
3207 Hogarth Lane
Collegeville, PA 19426 USA
(+1) 215 584 4261
The System V release 4 lint is ANSI-compatible, and is available separately (bundled with other C tools) from UNIX Support Labs (a subsidiary of AT&T), or from System V resellers.