Path: utzoo!utgpu!news-server.csri.toronto.edu!smoke.cs.toronto.edu!neat.cs.toronto.edu!moraes Newsgroups: comp.lang.c From: moraes@cs.toronto.edu (Mark Moraes) Subject: Re: hiding lint's ravings (was Re: FAQ - malloc array - clarify) Message-ID: <90Sep11.231853edt.558@smoke.cs.toronto.edu> Keywords: malloc, Sun, lint Organization: Department of Computer Science, University of Toronto References: <8056@helios.TAMU.EDU> <1990Sep08.022034.8444@virtech.uucp> <8086@helios.TAMU.EDU> <881@laic.UUCP> Date: 12 Sep 90 03:19:40 GMT Lines: 17 ik@laic.UUCP (Ik Su Yoo) writes: >#ifndef lint >#define MALLOC(size) (malloc(size)) >#else >#define MALLOC(size) (0) >#endif With the unfortunate side effect that you now don't let lint check the argument to malloc/calloc/realloc/free. I much prefer the lint noise to this -- the lint noise doesn't hurt, but a missing argument to realloc may. If you create functions to allocate the different types you need, and stick them in a file, you get the lint noise in a single well-known place (or a few well-known places) and can easily ignore it. Mark.