From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,bcf036d75aed9c51 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-10-06 21:57:01 PST Path: gmd.de!xlink.net!howland.reston.ans.net!darwin.sura.net!news-feed-1.peachnet.edu!concert!decwrl!pa.dec.com!mogul From: mogul@pa.dec.com (Jeffrey Mogul) Newsgroups: comp.unix.osf.osf1 Subject: Re: Lint Picker? Date: 7 Oct 1993 01:29:22 GMT Organization: DEC Western Research Message-ID: <28vrdi$7ik@usenet.pa.dec.com> References: <4615@sparky.mdavcr.mda.ca> NNTP-Posting-Host: jove.pa.dec.com 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