[splint-discuss] Help with mmap() and abstract data type annotations

CBFalconer cbfalconer at yahoo.com
Sat Nov 1 13:16:18 EST 2003

David Hawkins wrote:
... snip ...
> I've been adding casts to function calls where
> appropriate to remove splint warnings. Since
> I plan to run splint on code as I write and
> test blocks of it, I'm quite happy with this
> slight typing overhead. If you recommend an
> alternate approach, I'm happy to listen.

Please don't top-post.

I strongly recommend against the casual use of casts, especially
to shut up warnings.  The result may be warning free, but can
easily contain fatal errors.  You are immediately overriding the
compilers (and splint is a form of compiler) judgement with your
own, and stating 'ignore this'.  Unnecessary casts are most likely
to be a sign of faulty initial thinking.

Chuck F (cbfalconer at yahoo.com) (cbfalconer at worldnet.att.net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!

More information about the splint-discuss mailing list