lint won't verify printf formatting against variable types??

Goran Larsson [Hacker of Hackefors] hacker at isadora.ikp.liu.se
Wed Jun 28 18:32:33 AEST 1989


In article <105 at borabora.omni.com> bob at 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 at isadora.ikp.liu.se (Internet)
    !



More information about the Comp.lang.c mailing list