Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!att!cbnewsh!daw From: daw@cbnewsh.att.com (David Wolverton) Newsgroups: comp.lang.c Subject: Re: How to stop lint complaining about malloc() Message-ID: <1990Jun27.201317.3217@cbnewsh.att.com> Date: 27 Jun 90 20:13:17 GMT References: <15130.267e60b1@levels.sait.edu.au> <16944@haddock.ima.isc.com> <16972@haddock.ima.isc.com> Organization: AT&T Bell Labs, Lincroft, NJ Lines: 19 In article <16972@haddock.ima.isc.com>, karl@haddock.ima.isc.com (Karl Heuer) writes: > In article <1990Jun24.154126.17713@jarvis.csri.toronto.edu> flaps@dgp.toronto.edu (Alan J Rosenthal) writes: > >daw@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