Path: utzoo!attcan!uunet!husc6!ukma!uflorida!novavax!proxftl!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.lang.c Subject: Re: lint warning messages with malloc() Message-ID: <150@twwells.uucp> Date: 6 Nov 88 20:57:45 GMT References: <142@cjsa.WA.COM> <355@marob.MASA.COM> <182@umigw.MIAMI.EDU> Reply-To: bill@twwells.UUCP (T. William Wells) Distribution: na Organization: None, Ft. Lauderdale Lines: 24 Summary: Expires: Sender: Followup-To: Keywords: In article <182@umigw.MIAMI.EDU> steve@umigw.miami.edu (steve emmerson) writes: : I sometimes use: : : #ifdef lint : # define malloc(s) 0 : #else : extern char *malloc(); : #endif : : Unfortunately, this means that lint(1) can no longer check the type of the : argument. C'est la vie. But you could do this: #ifdef lint static void malloc_kludge(n) size_t n; { n = n; } #define malloc(x) (malloc_kludge(x), 0) #else extern char *malloc(); #endif --- Bill {uunet|novavax}!proxftl!twwells!bill