Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!kth!sunic!liuida!prodix!isadora!hacker From: hacker@isadora.ikp.liu.se (Goran Larsson [Hacker of Hackefors]) Newsgroups: comp.lang.c Subject: Re: lint won't verify printf formatting against variable types?? Keywords: lint, cc Message-ID: <411@isadora.ikp.liu.se> Date: 28 Jun 89 08:32:33 GMT References: <328@tree.UUCP> <417@siswat.UUCP> <105@borabora.omni.com> Organization: Hackers Home, Hackefors, Linkoping, Sweden Lines: 27 In article <105@borabora.omni.com> bob@omni.com (Bob Weissman) writes: >Last week I spent an entire day tracking down one of those bugs you just >don't see after staring at your code too long. It was of the form: > > if (condition); > action; It's your own fault -- you should have written it as if ( condition ) { action; } to reduce the risk of errors! >My lint (SunOS 4.0.1 version) did not flag the extra semicolon. It isn't supposed to find this "error" as it is legal C. >I Hate C. I Love C ! _ ! ! Goran Larsson [The Hacker of Hackefors] --+-! Hackefors, Linkoping, SWEDEN (See) +46 13-155535 (Hear) !-+-- ...!uunet!sunic!liuida!prodix!isadora!hacker (UUCP) ! ! hacker@isadora.ikp.liu.se (Internet) !