Lint is your friend?
Paul Eggert
twinsun!eggert at uunet.uu.net
Thu Jun 14 07:19:20 AEST 1990
In Sun-Spots 9:209:15 duanev at 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!
More information about the Comp.sys.sun
mailing list