By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,611 Members | 1,635 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,611 IT Pros & Developers. It's quick & easy.

Any C/C++ LINT type checking recomendations

P: n/a
We have a large code base, mainly C but with some C++ which we wish to check
for
existing issues in an effort to be proactive.

I have downloaded the open source GLINT program but am having big problems
trying to get it to run.

I will be looking at PC-Lint at http://www.gimpel.com/

Does anyone have any other recommendations, it can be commercial s/w for
this ?
Also Perl scripts would be good as well to run over the source as an
alternative.

Many thanks
Nov 14 '05 #1
Share this Question
Share on Google+
31 Replies


P: n/a
* Thus spoke Greg Roberts <gr*********@citectNOSPAM.com>:

Hallo,
We have a large code base, mainly C but with some C++ which we wish to
check for existing issues in an effort to be proactive. I have downloaded the open source GLINT program but am having big problems
trying to get it to run.
glint?

$ man glint

| NAME
| glint - GLINT/Permedia video driver

Do you mean splint? Splint doesn't work with C++ code, see
<http://splint.org/faq.html#quest5>.
I will be looking at PC-Lint at http://www.gimpel.com/


Afaik its the best lint (for C and C++ code) out there.
[f'up2 -> poster]

Wolfgang.
--
"Erfahrungen -- das sind die vernarbten Wunden unserer Dummheit."
-- John Osborne
Nov 14 '05 #2

P: n/a
Greg Roberts wrote:

We have a large code base, mainly C but with some C++ which we
wish to check for existing issues in an effort to be proactive.

I have downloaded the open source GLINT program but am having
big problems trying to get it to run.

I will be looking at PC-Lint at http://www.gimpel.com/

Does anyone have any other recommendations, it can be
commercial s/w for this ? Also Perl scripts would be good as
well to run over the source as an alternative.


Don't know about GLINT. SPLINT is free and good, but only handles
C. PC-Lint will cost you about $200 (US) and will handle C++ and
C.

Turning these things loose on an existing code is likely to be
unproductive, especially if it is a large code base, because of
the volume of nits to pick. Use on new modules will be very
productive.

Congratulations. This is the first legitimate c.l.c c.l.c++
crosspost I have seen.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #3

P: n/a
Greg Roberts wrote:
We have a large code base, mainly C but with some C++ which we wish to check
for
existing issues in an effort to be proactive.


lint and lint-like programs are annoying to the point of uselessness.
They consistently warn about things that /are not wrong/, /never have
been wrong/, and /are not even dangerous/. There's one example that
sticks out in my mind:

int x = 1;

/* code */

if (x) return y;

will /always/ generate a warning with a lint-like program. Why? Because
x is not a `boolean' in lint's view of the world, even though the
relevant standards expressly and specifically allow scalars (such as x)
to function in a boolean context. lint is wrong, the standards are right
(axiomatically), and lint hasn't been fixed.

Also, remember that lint cannot be trusted to `schedule' or `prioritize'
warnings: Using gets() is seen as just as bad as using an int in a
boolean context. (I hope you know how bad gets() is. I hope it's not
polluted C++ as well.)

All that said, splint is good for C but it won't work for C++: splint
allows you to pass in arguments on the command line that will make it
not generate certain classes of warnings. It's the only lint-a-like I
will use, but I don't develop C++.

So, in short, know the limits of your tools.

--
My address is yvoregnevna gjragl-guerr gjb-gubhfnaq guerr ng lnubb qbg pbz
Note: Rot13 and convert spelled-out numbers to numerical equivalents.
Nov 14 '05 #4

P: n/a
Greg Roberts wrote:
We have a large code base, mainly C but with some C++ which we wish to check
for
existing issues in an effort to be proactive.

I have downloaded the open source GLINT program but am having big problems
trying to get it to run.

I will be looking at PC-Lint at http://www.gimpel.com/


As far as I know, no good free C++ lint program exists. I have been
thinking seriously about make one for the GNU project, but haven't had
the time yet. My basic idea is that it should basically be a parser with
easily extendable rules and actions that can be defined by a simple
language in a configuration file. All sorts of things should of course
come predefined.

/David
Nov 14 '05 #5

P: n/a
apologies, yes splint under win32

almost impossible to get all the includes and options correct

"Wolfgang Kaufmann" <wk**************@theparallax.com> wrote in message
news:sl*****************************@news.theparal lax.net...
* Thus spoke Greg Roberts <gr*********@citectNOSPAM.com>:

Hallo,
We have a large code base, mainly C but with some C++ which we wish to
check for existing issues in an effort to be proactive.

I have downloaded the open source GLINT program but am having big problems trying to get it to run.


glint?

$ man glint

| NAME
| glint - GLINT/Permedia video driver

Do you mean splint? Splint doesn't work with C++ code, see
<http://splint.org/faq.html#quest5>.
I will be looking at PC-Lint at http://www.gimpel.com/


Afaik its the best lint (for C and C++ code) out there.
[f'up2 -> poster]

Wolfgang.
--
"Erfahrungen -- das sind die vernarbten Wunden unserer Dummheit."
-- John Osborne

Nov 14 '05 #6

P: n/a
I incorrectly said lint where i meant splint, and our env. was MS Visual
C/C++ 6.0 .

Yes you all have mentioned what i found, really hard work to get these to
work
on an existing code base (as i don't really want to have to play with
headers & system headers adnusium) .

Even one expensive tool like C++ Test (U$3500) doesn't look at the MS DSP
files to determine headers to search.

I suspect just adding some basic rules into some Perl scripts will probably
offer the most payback.

Regards

"Greg Roberts" <gr*********@citectNOSPAM.com> wrote in message
news:IZ******************@news-server.bigpond.net.au...
We have a large code base, mainly C but with some C++ which we wish to check for
existing issues in an effort to be proactive.

I have downloaded the open source GLINT program but am having big problems
trying to get it to run.

I will be looking at PC-Lint at http://www.gimpel.com/

Does anyone have any other recommendations, it can be commercial s/w for
this ?
Also Perl scripts would be good as well to run over the source as an
alternative.

Many thanks

Nov 14 '05 #7

P: n/a
On Sun, 01 Feb 2004 21:53:01 -0700, August Derleth <se*@sig.now>
wrote:
int x = 1;

/* code */

if (x) return y;

will /always/ generate a warning with a lint-like program. Why? Because
x is not a `boolean' in lint's view of the world, even though the
relevant standards expressly and specifically allow scalars (such as x)
to function in a boolean context. lint is wrong, the standards are right
(axiomatically), and lint hasn't been fixed.


Lint doesn't need fixing in this case - it's doing exactly what it's
supposed to do. If I were reviewing someone's code which used this
statement, I would suggest that they change it to

if (x != 0) return y;

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 14 '05 #8

P: n/a
Alan Balmer wrote:
On Sun, 01 Feb 2004 21:53:01 -0700, August Derleth <se*@sig.now>
wrote:
int x = 1;

/* code */

if (x) return y;

will /always/ generate a warning with a lint-like program. Why?
Because x is not a `boolean' in lint's view of the world, even
though the relevant standards expressly and specifically allow
scalars (such as x) to function in a boolean context. lint is wrong,
the standards are right (axiomatically), and lint hasn't been fixed.


Lint doesn't need fixing in this case - it's doing exactly what it's
supposed to do. If I were reviewing someone's code which used this
statement, I would suggest that they change it to

if (x != 0) return y;


And I would change it to

if (0 != x) return y;

At least that was taught to me in programming paranoia school.

BTW the above (if (X) bla) is not bad style (I do nor recall any technical
reason for it) but I think it is rather idiomatic code, and there is nothing
wrong with it.

--
Attila aka WW
Nov 14 '05 #9

P: n/a
In article <bv**********@newstree.wise.edt.ericsson.se>,
"Attila Feher" <at**********@lmf.ericsson.se> wrote:
Alan Balmer wrote:
On Sun, 01 Feb 2004 21:53:01 -0700, August Derleth <se*@sig.now>
wrote:
int x = 1;

/* code */

if (x) return y;

will /always/ generate a warning with a lint-like program. Why?
Because x is not a `boolean' in lint's view of the world, even
though the relevant standards expressly and specifically allow
scalars (such as x) to function in a boolean context. lint is wrong,
the standards are right (axiomatically), and lint hasn't been fixed.


Lint doesn't need fixing in this case - it's doing exactly what it's
supposed to do. If I were reviewing someone's code which used this
statement, I would suggest that they change it to

if (x != 0) return y;


And I would change it to

if (0 != x) return y;

At least that was taught to me in programming paranoia school.


Please don't do this.

First, it is pointless. There are people who write "0 == x" instead of
"x == 0" to get an error message if they write "=" instead of "==", but
for "!=" this makes no sense. Second, it makes your code less readable
which in itself will increase the number of undetected errors. Third, I
sincerely hope that you use a debugger to step through your code at
least once, so an error like that would be detected immediately. Fourth,
"if (0 == x)" wouldn't pass any decent code review for the reasons
above, but neither would "if (x = 0)".
Nov 14 '05 #10

P: n/a
Christian Bau wrote:

<snip>
There are people who write "0 == x" instead of
"x == 0" to get an error message if they write "=" instead of "==", but
for "!=" this makes no sense.
Er, 0 != x makes exactly as much sense as x != 0
Second, it makes your code less readable
which in itself will increase the number of undetected errors.
Whether it's less readable is arguable; if it helps people to get used to
the idea of placing constants on the left of comparisons, then - on
platforms with lousy compilers - it could *reduce* the number of undetected
errors.
Third, I
sincerely hope that you use a debugger to step through your code at
least once, so an error like that would be detected immediately.
And yet they so often aren't.
Fourth,
"if (0 == x)" wouldn't pass any decent code review for the reasons
above, but neither would "if (x = 0)".


I wouldn't raise any objections to if(0 == x) at a code review.
--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #11

P: n/a
On Mon, 02 Feb 2004 10:56:51 -0700, in comp.lang.c , Alan Balmer
<al******@att.net> wrote:
if (x) return y;

will /always/ generate a warning with a lint-like program. Why? Because
x is not a `boolean' in lint's view of the world, even though the
relevant standards expressly and specifically allow scalars (such as x)
to function in a boolean context. lint is wrong, the standards are right
(axiomatically), and lint hasn't been fixed.


Lint doesn't need fixing in this case - it's doing exactly what it's
supposed to do. If I were reviewing someone's code which used this
statement, I would suggest that they change it to

if (x != 0) return y;


Thats merely obfuscating a perfectly clear expression.

And I agree with August that lint is incorrect - lint should not be
complaining about legal constructs.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #12

P: n/a
"Richard Heathfield" <do******@address.co.uk.invalid> wrote in message
news:bv**********@titan.btinternet.com...

Er, 0 != x makes exactly as much sense as x != 0
To a compiler, yes. If you have learned to think like one, congratulations.
I wouldn't raise any objections to if(0 == x) at a code review.


But neither would you to if (!x), I hope.

Peter
Nov 14 '05 #13

P: n/a
Peter Pichler wrote:
"Richard Heathfield" <do******@address.co.uk.invalid> wrote in message
news:bv**********@titan.btinternet.com...

Er, 0 != x makes exactly as much sense as x != 0
To a compiler, yes. If you have learned to think like one,
congratulations.


Um... um... thank you! (?!?!?)
I wouldn't raise any objections to if(0 == x) at a code review.


But neither would you to if (!x), I hope.


Depends on the house style, of course (as does the 0 == x one, actually!).
But my own preference is to reserve (x) and (!x) for where x clearly has
Boolean intent, e.g. if(PrinterReady), while(!finished), and so on.

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #14

P: n/a
Attila Feher wrote:
And I would change it to

if (0 != x) return y;

At least that was taught to me in programming paranoia school.

BTW the above (if (X) bla) is not bad style (I do nor recall any technical
reason for it) but I think it is rather idiomatic code, and there is nothing
wrong with it.


The idiom 'if (x) bla;' had certain advantages over the
construct 'if (0 != x) bla;' before compilers grew up. A
number of compilers I used circa K&R used to compile a
compare rather than a test. Nowadays there is no advantage
and the second version is more readable. The one line
statement has a problem though should you ever want to place
a breakpoint on the 'return';

Nov 14 '05 #15

P: n/a
Mark McIntyre wrote:

And I agree with August that lint is incorrect - lint should not be
complaining about legal constructs.


Why should that be? Isn't it the compilers responsibility to
complain about none legal constructs?

Nov 14 '05 #16

P: n/a
On Tue, 3 Feb 2004 22:44:13 +0000 (UTC), in comp.lang.c , Richard
Heathfield <do******@address.co.uk.invalid> wrote:
Christian Bau wrote:

<snip>
There are people who write "0 == x" instead of
"x == 0" to get an error message if they write "=" instead of "==", but
for "!=" this makes no sense.


Er, 0 != x makes exactly as much sense as x != 0


indeed.
but you're less likely to miss out the ! in != than the = in ==, which
was CB's point, I suspect.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #17

P: n/a
Richard Heathfield wrote:
Christian Bau wrote:

<snip>
There are people who write "0 == x" instead of "x == 0" to get
an error message if they write "=" instead of "==", but for
"!=" this makes no sense.

.... snip ...
"if (0 == x)" wouldn't pass any decent code review for the
reasons above, but neither would "if (x = 0)".


I wouldn't raise any objections to if(0 == x) at a code review.


Nor would I, nor to "if (0 != x)". In fact I would be more likely
to complain about use of "if (x == 0)".

Just stirring the pot with a vote - minor troll.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #18

P: n/a
Mark McIntyre wrote:

And I agree with August that lint is incorrect - lint should not be
complaining about legal constructs.


Then you don't understand what lint is about.

/David
Nov 14 '05 #19

P: n/a
Mark McIntyre <ma**********@spamcop.net> wrote in message news:
And I agree with August that lint is incorrect - lint should not be
complaining about legal constructs.


Just because something is 'legal' (not really an adequate word in this
sense) doesn't mean that it's the correct thing to do, does it?
Nov 14 '05 #20

P: n/a
On Tue, 03 Feb 2004 23:41:47 +0000, Mark McIntyre
<ma**********@spamcop.net> wrote:

And I agree with August that lint is incorrect - lint should not be
complaining about legal constructs.


I think you're confusing the roles of lint and the compiler.

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 14 '05 #21

P: n/a
Mark McIntyre wrote:
.... snip ...
And I agree with August that lint is incorrect - lint should not
be complaining about legal constructs.


It is not. It is warning about possibly suspicious constructs,
which is a different world.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #22

P: n/a
On Wed, 04 Feb 2004 11:03:08 +0100, in comp.lang.c , David Rasmussen
<da*************@gmx.net> wrote:
Mark McIntyre wrote:

And I agree with August that lint is incorrect - lint should not be
complaining about legal constructs.


Then you don't understand what lint is about.


There's no "what lint's about" stuff here. I'm not into the
metaphysical aspects of toolsets. :-)
As far as I'm concerned lint's a tool, If its doesn't do what I want,
then its either
a) the wrong tool or
b) a badly implemented tool.

I happen to believe its the right tool. but IMHO a C code checker that
complains about correct C is badly implemented.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #23

P: n/a
On Wed, 04 Feb 2004 08:36:14 -0700, in comp.lang.c , Alan Balmer
<al******@att.net> wrote:
On Tue, 03 Feb 2004 23:41:47 +0000, Mark McIntyre
<ma**********@spamcop.net> wrote:

And I agree with August that lint is incorrect - lint should not be
complaining about legal constructs.


I think you're confusing the roles of lint and the compiler.


I don't. I don't espcially care to argue about it but I'd just make
the point that a tool that ostensibly is intended to help clean up
your code, but which fills stdout with reams of inaccurate or
misleading error messages, is worse than useless.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #24

P: n/a
On Wed, 04 Feb 2004 15:43:06 GMT, in comp.lang.c , CBFalconer
<cb********@yahoo.com> wrote:
Mark McIntyre wrote:

... snip ...

And I agree with August that lint is incorrect - lint should not
be complaining about legal constructs.


It is not. It is warning about possibly suspicious constructs,
which is a different world.


???
I can understand complaining about
if(x=11)

but whats suspicious about
if(x)
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #25

P: n/a
Mark McIntyre wrote:

I don't. I don't espcially care to argue about it but I'd just make
the point that a tool that ostensibly is intended to help clean up
your code, but which fills stdout with reams of inaccurate or
misleading error messages, is worse than useless.


lint ... | filter_out_the_error_i_dont_like

Nov 14 '05 #26

P: n/a
nrk
Mark McIntyre wrote:
On Wed, 04 Feb 2004 15:43:06 GMT, in comp.lang.c , CBFalconer
<cb********@yahoo.com> wrote:
Mark McIntyre wrote:
... snip ...

And I agree with August that lint is incorrect - lint should not
be complaining about legal constructs.


It is not. It is warning about possibly suspicious constructs,
which is a different world.


???
I can understand complaining about
if(x=11)

but whats suspicious about
if(x)


Warning: This could be substantially incorrect, or incorrectly phrased.
Corrections are most welcome.

Lint has a separate boolean type which can only be generated by logical
operators, and conditional expressions are supposed to have boolean type in
lint world. x may or may not satisfy that constraint. If it doesn't, lint
complains. That this annoys you is not lint's concern. lint was born in
academia with a different purpose in mind.

Part of the idea behind lint (atleast initially) was stricter type checking
(which is now commonly acknowledged to be a very wise thing indeed) so that
more errors are caught by static analysis. As has been correctly
mentioned, lint has a totally different purpose from a C compiler. What is
legal C is not necessarily a correct program. lint and its future
derivatives try to bridge the gap between "what you said" and "what you
want done". This is an admirable and extremely difficult (if not
impossible) goal.

I haven't been a big fan of lint as it does produce too much clutter, and
its stricter standards are almost impossible to adhere to by any human
coder. To be fair, the primary driving force behind lint wasn't
necessarily usability in real world. To quote from:
http://www.cs.virginia.edu/evans/pubs/tr628.ps

<quote>
Although LCLint is intended to be a pragmatic and useful tool, the primary
motivation behind its development is to investigate the possibilities of
using specifications to do lightweight static checks on source code. By
developing LCLint, we hope to learn if using specifications to check source
code can be a practical and effective way of improving software quality. We
also hope to gain an understanding of how the desire for static code
checkers may influence the design of formal specification languages and the
adoption of programming conventions. By using LCLint in a variety of ways,
we hope to learn if and how such a tool can enable better software
engineering, reduce the effort required to develop good programs, and help
us understand and maintain existing programs.
</quote>

However, splint provides command line options that can control most of the
annoyances, and when used appropriately improves productivity and code
quality considerably (in my case atleast).

August Derleth is incorrect in asserting: lint and lint-like programs are annoying to the point of uselessness.
They consistently warn about things that /are not wrong/, /never have
been wrong/, and /are not even dangerous/. There's one example that
sticks out in my mind:

int x = 1;

/* code */

if (x) return y;

will always generate a warning with a lint-like program. Why? Because
x is not a `boolean' in lint's view of the world, even though the
relevant standards expressly and specifically allow scalars (such as x)
to function in a boolean context. lint is wrong, the standards are right
(axiomatically), and lint hasn't been fixed.


The fact is that lint is trying to enforce a subset of standard C that it
considers to be safer/better. Just because something is correct according
to the standard doesn't mean it has to be correct in lint's view of the
world. If this were true, lint's utility is highly questionable.

Also in splint, +boolint +ptrnegate +boolops +charint will take care of that
annoyance (mostly).

-nrk.

--
Remove devnull for email
Nov 14 '05 #27

P: n/a
Mark McIntyre wrote:
<cb********@yahoo.com> wrote:
Mark McIntyre wrote:

... snip ...

And I agree with August that lint is incorrect - lint should
not be complaining about legal constructs.


It is not. It is warning about possibly suspicious constructs,
which is a different world.


???
I can understand complaining about
if(x=11)

but whats suspicious about
if(x)


and "if (x == 11)", which is pristine. Another thing to watch for
is "if (x = y + z)" which is also valid, but suspicious. Yet that
last is a very useful construct. The first is normally caught by
insisting that "if (CONST == variable)" be written with the CONST
first.

Note that every snippet above is legal C code.

Assuming x is an int in both cases, the first allows for no
misconceptions barring a typo. The second _could_ be a typo or
other error, even though it is valid code. Valid code does NOT
mean correct code. So you usually have several choices - write
code that cannot be misconstrued, as in the third, annotate the
statement to suppress the warning, or use various configuration
possibilities to suppress all warnings of this type.

Splint, lint, pclint etc. should not be used before the source
passes the compiler. So there should be no gross syntax errors.
By now you are interested in having your attention drawn to areas
that *may* deserve further review.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #28

P: n/a
lilburne <li******@godzilla.net> wrote:
Mark McIntyre wrote:
I don't. I don't espcially care to argue about it but I'd just make
the point that a tool that ostensibly is intended to help clean up
your code, but which fills stdout with reams of inaccurate or
misleading error messages, is worse than useless.


lint ... | filter_out_the_error_i_dont_like


s/error/dozens_of_errors, by which time your command line will be a
couple of dozen screen lines long.

Richard
Nov 14 '05 #29

P: n/a


Richard Bos wrote:
lilburne <li******@godzilla.net> wrote:

Mark McIntyre wrote:

I don't. I don't espcially care to argue about it but I'd just make
the point that a tool that ostensibly is intended to help clean up
your code, but which fills stdout with reams of inaccurate or
misleading error messages, is worse than useless.


lint ... | filter_out_the_error_i_dont_like

s/error/dozens_of_errors, by which time your command line will be a
couple of dozen screen lines long.


If you believe that then you are working too hard.

Nov 14 '05 #30

P: n/a
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote in message news:<40****************@news.individual.net>...
lilburne <li******@godzilla.net> wrote:
Mark McIntyre wrote:
I don't. I don't espcially care to argue about it but I'd just make
the point that a tool that ostensibly is intended to help clean up
your code, but which fills stdout with reams of inaccurate or
misleading error messages, is worse than useless.


lint ... | filter_out_the_error_i_dont_like


s/error/dozens_of_errors, by which time your command line will be a
couple of dozen screen lines long.

Richard


Write a script to do the filtering. You could call it
'filter_out_the_errors_i_dont_like'! Perl would be a good choice.
Nov 14 '05 #31

P: n/a
On 5 Feb 2004 07:33:11 -0800, in comp.lang.c ,
my***********@fsmail.net (Mystic Mouflon) wrote:
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote in message news:<40****************@news.individual.net>...
lilburne <li******@godzilla.net> wrote:
> Mark McIntyre wrote:
>
> > I don't. I don't espcially care to argue about it but I'd just make
> > the point that a tool that ostensibly is intended to help clean up
> > your code, but which fills stdout with reams of inaccurate or
> > misleading error messages, is worse than useless.
>
> lint ... | filter_out_the_error_i_dont_like


s/error/dozens_of_errors, by which time your command line will be a
couple of dozen screen lines long.

Richard


Write a script to do the filtering. You could call it
'filter_out_the_errors_i_dont_like'! Perl would be a good choice.


Yeah, but then I'd have to lint the script, in case I had some bugs in
it.... :-)

Seriously tho, if I filtered it, I might filter real errors by
mistake.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #32

This discussion thread is closed

Replies have been disabled for this discussion.