Path: utzoo!attcan!uunet!cs.utexas.edu!rice!sun-spots-request From: twinsun!eggert@uunet.uu.net (Paul Eggert) Newsgroups: comp.sys.sun Subject: Re: Lint is your friend? Keywords: Software Message-ID: <8860@brazos.Rice.edu> Date: 13 Jun 90 21:19:20 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 19 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n209 X-Sun-Spots-Digest: Volume 9, Issue 214, message 4 In Sun-Spots 9:209:15 duanev@mcc.com (Duane Voth) asks: |Does anyone know of tricks that can be used to selectively shut lint up |about certain problems? | |For example; malloc() et.al... Try something like this: #ifdef lint char *lintalloc; # define talloc(T,n) (lintalloc = malloc(sizeof(T)*(n)), (T*)0) #else # define talloc(T,n) ((T*)malloc(sizeof(T)*(n))) #endif int *p = talloc(int, 100); /* example of use */ You can thus muzzle lint as selectively as you please, but don't overdo it!