Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!apple!ames!pacbell!att!ihlpl!knudsen From: knudsen@ihlpl.ATT.COM (Knudsen) Newsgroups: comp.lang.c Subject: Re: lint won't verify printf formatting against variable types?? Summary: How does this protect? Keywords: lint, cc Message-ID: <11038@ihlpl.ATT.COM> Date: 3 Jul 89 17:42:27 GMT References: <328@tree.UUCP> <417@siswat.UUCP> <105@borabora.omni.com> <411@isadora.ikp.liu.se> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 21 In article <411@isadora.ikp.liu.se>, hacker@isadora.ikp.liu.se (Goran Larsson [Hacker of Hackefors]) writes: > It's your own fault -- you should have written it as > if ( condition ) { > action; > } > to reduce the risk of errors! Yes, but suppose you make the same typo and get if ( condition ); { /* extra semicolon */ action; } Isn't this still legal C (with the same bug), since compound blocks may be started anywhere? I can see always using the { } in case you want to add more statements later, but I don't see where it avoids the original type bug. -- Mike Knudsen Bell Labs(AT&T) att!ihlpl!knudsen knudsen@ihlpl.att.com Round and round the while() loop goes; "Whether it stops," Turing says, "no one knows!" Shotguns -- just say PULL!