Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: mogul@pa.dec.com (Jeffrey Mogul)
Subject: Re: Lint Picker?
Date: 7 Oct 1993 01:29:22 GMT	[thread overview]
Message-ID: <28vrdi$7ik@usenet.pa.dec.com> (raw)
In-Reply-To: 4615@sparky.mdavcr.mda.ca

In article <4615@sparky.mdavcr.mda.ca> das@mdavcr.mda.ca (Darcy Semeniuk) writes:
>The lint that comes with OSF/1 v1.3 isn't very good - ie it misses
>things like:
>
>if ( a = b)
>{
>[.....]
>}
>
>which never executes the code in the {}'s
>
>Does anyone know of a lint that I can get for OSF/1 that has better
>checking?

I don't know much about the lint that ships with OSF/1, but I think
in your particular example, lint is OK.  Take this example program:
    main(argc, argv)
    int argc;
    char **argv;
    {
	    int a, b;
	    b = atoi(argv[1]);
	    if (a = b) {
	       printf("got here\n");
	    }
    }

Now, running this program with a non-zero integer as a command-line
argument will print "got here", but with "0" as an argument it will
print nothing.  So you can't really complain about lint because lint
cannot know if the printf() is executed or not.

-Jeff


  reply	other threads:[~1993-10-07  1:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-10-06 17:20 Lint Picker? Darcy Semeniuk
1993-10-07  1:29 ` Jeffrey Mogul [this message]
1993-10-07  6:46   ` todd j. derr
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox