2 lint questions

Karl Heuer karl at haddock.ima.isc.com
Fri Aug 18 01:09:42 AEST 1989


In article <1989Aug16.152316.24402 at algor2.uu.net> jeffrey at algor2.UUCP (Jeffrey Kegler) writes:
>I believe in making lint absolutely silent, that is, lint returns nothing
>but another shell prompt.

I believe this is a worthy goal, but I refuse to add that much clutter to my
code just to work around a lint bug.

>In article <5967 at ingr.com> boyd at ingr.com (Boyd Nation) writes:
>>1)  How does one prevent lint from issuing a warning message about possible
>>pointer alignment problems given the following line of code:
>>	x = (blivet *)malloc(sizeof(blivet));

The best long-term solution is to pester your vendor to fix lint.  A simple
lintpragma /*ALIGNED*/, attached to the declarations (*not* the invocations!)
of malloc(), calloc(), and realloc() would be a nice general solution.

You might also ask them to add a lintpragma /*NONRETURNING*/ that can be
attached to the declarations of exit() and longjmp(), which would obsolete the
/*NOTREACHED*/ hack.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list