🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6138

Re: Yet Another Lint Foul-up

#6138
From: Dave Jones
Date: Mon, 09 Jan 1989 23:08
28 lines
1712 bytes
From article <16441@lll-winken.LLNL.GOV>, by miller@lll-crg.llnl.gov (Patrick Miller):
> With regards the ``exit'' (as well as any other routine that does
> not exit).  Why not just include a line like
> 
> #define Exit(x)		exit(x) /*NOTREACHED*/
> 

Because cpp will probably remove the NOTREACHED comment.

The Sun3 version has a cpp flag which says, "Leave the comments in,"
but I don't think you can count on that being portable.

I'm kind of new to "lint".  Some of my programs from a
few years ago make lint go berserk. But now I lint my programs carefully,
as much for the benefit of generations to come as for my own purposes.
But it seems that some messages you just can't fend off without doing
all sorts of silly stuff.

I haven't been following the discussion, so perhaps this has been
suggested.  What you can do is to prepare an AWK script
to filter the output of lint.  Each tolerable message has an AWK-match
that throws it away.  The default AWK-match is to print the line.
When it's not obvious why you don't want the message, put a comment next
to the patern which matches it.

(P.S. I use new AWK, or "nawk" as it's called in 4.2 climes. It is a
distinct improvement over old AWK.  It is described in the new AWK
book by the original A, W, and K.: _The_AWK_Programming_Language_.)
Technical Details
Message-ID: <1163@goofy.megatest.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!megatest!djones
References: <16441@lll-winken.LLNL.GOV>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!megatest!djones
From: djones@megatest.UUCP (Dave Jones)
Newsgroups: comp.lang.misc
Subject: Re: Yet Another Lint Foul-up
Message-ID: <1163@goofy.megatest.UUCP>
Date: 9 Jan 89 23:08:50 GMT
References: <16441@lll-winken.LLNL.GOV>
Organization: Megatest Corporation, San Jose, Ca
Lines: 28