How to stop lint complaining about malloc()

David Wolverton daw at cbnewsh.att.com
Thu Jun 28 06:13:17 AEST 1990


In article <16972 at haddock.ima.isc.com>, karl at haddock.ima.isc.com (Karl Heuer) writes:
> In article <1990Jun24.154126.17713 at jarvis.csri.toronto.edu> flaps at dgp.toronto.edu (Alan J Rosenthal) writes:
> >daw at cbnewsh.att.com (David Wolverton) writes:
> >>The SVR4 lint "does the right thing" on calls to malloc(), but
> >>then SVR4's header files declare "void *malloc(size_t);" too.
> >>A lintpragma isn't necessary if you support ANSI C.
> 
> >I assume you're referring to the fact that lint can recognize malloc() as a
> >special case.
> 
> No, I believe he's saying that `void *' automatically kills the warning.  As I
> already noted in a parallel article, this really solves the wrong problem.

Karl is probably right.  But then, I'm not interested in trying to
defend the design goals of the SVR4 lint, because I didn't design it.

Dave Wolverton

<claimer>



More information about the Comp.lang.c mailing list