Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!think.com!paperboy!hsdndev!cmcl2!lanl!beta.lanl.gov.!mikeg From: mikeg@c3.c3.lanl.gov (Michael P. Gerlek) Newsgroups: comp.lang.c Subject: format string linting? Message-ID: Date: 25 Jan 91 19:06:42 GMT Sender: news@lanl.gov Distribution: comp Organization: Los Alamos National Laboratory, New Mexico Lines: 31 (This only *sounds* bizzarre... Trust me.) Does anyone have a hack that will "lint" my format strings for printf, scanf, and the like? For example, char *s; printf("%d", s); is icky, but lint can't see it. Furthermore, int x,y; printf("%d %d %d", x, y); is equally icky. I really need a hack that will grind through thousands of lines of C to find these yucky lines. Ob. explanation: these errors crop up in error code like: if (frob != notz) printf("Internal error: frob (%d) != notz (%d)\n"); where only at certain high tide/moon phase conditions would these error lines get printed... Thanks. -[mpg] mikeg@lanl.gov "...making the world safe for supercomputing."