Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!mailrus!ncar!ico!ism780c!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: 2 lint questions Message-ID: <14324@haddock.ima.isc.com> Date: 17 Aug 89 15:09:42 GMT References: <5967@ingr.com> <1989Aug16.152316.24402@algor2.uu.net> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 21 In article <1989Aug16.152316.24402@algor2.uu.net> jeffrey@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@ingr.com> boyd@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@haddock.isc.com), The Walking Lint