Path: utzoo!attcan!uunet!husc6!ukma!uflorida!novavax!proxftl!bill
From: bill@proxftl.UUCP (T. William Wells)
Newsgroups: comp.lang.c
Subject: Re: lint on malloc calls
Keywords: lint, malloc, alignment
Message-ID: <781@proxftl.UUCP>
Date: 18 Sep 88 06:10:51 GMT
References: <39617@linus.UUCP> <9900007@bradley> <216@iaoobelix.UUCP> <7592@haddock.ima.isc.com>
Reply-To: bill@proxftl.UUCP (T. William Wells)
Organization: Proximity Technology, Ft. Lauderdale
Lines: 29
Summary:
Expires:
Sender:
Followup-To:
Distribution:

I don't see why this is being debated any longer.  I suggested
adding the following kludge to each file where malloc is used:

#ifdef lint
#define malloc(x) 0
#endif

to shut up lint; this will work because each use of malloc will
be changed from

	ptr = (type)malloc(size);

to

	ptr = (type)0;

If you don't like this because it doesn't type check the malloc
argument, you can do this instead:

#ifdef lint
void malloc_kludge(n) size_t n; { n = n; }
#define malloc(x) (malloc_kludge(x), 0)
#endif

Can we have an end to this?

---
Bill
novavax!proxftl!bill