Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site elsie.UUCP Path: utzoo!watmath!clyde!floyd!vax135!cornell!uw-beaver!tektronix!zehntel!hplabs!hao!seismo!rlgvax!cvl!elsie!ado From: ado@elsie.UUCP Newsgroups: net.lang.c Subject: Wanted--better way to please lint and sccs Message-ID: <831@elsie.UUCP> Date: Sat, 3-Mar-84 10:52:04 EST Article-I.D.: elsie.831 Posted: Sat Mar 3 10:52:04 1984 Date-Received: Mon, 5-Mar-84 00:25:15 EST Organization: NIH-LEC, Bethesda, MD Lines: 22 Apologies if this is rehash... One way to get "Source Code Control System*" strings into the object file for "file.c" is to have it include a line like static char sccsid[] = "%A%"; However, if I include this line and fail to refer to sccsid, lint gripes. I can get the SCCS information in (and keep lint happy) with a line like static sccsid() { if (!"%A%") sccsid(); } which I think is pretty obscure. (Briefly: the call of sccsid avoids a lint "defined but never used" diagnostic; "%A%" appears in an "if" expression to avoid a lint "null effect" diagnostic; the '!' is there to avoid an infinite loop if "sccsid" is mistakenly called, and to reduces the amount of code generated.) What's a clearer or more concise way of doing this? Use the 'r' command to reply to me by mail if you know. Thanks. -- * Unless "SCCS" is a trademark, I'm trademark free for once. -- UUCP: decvax!harpo!seismo!rlgvax!cvl!elsie!ado DDD: (301) 496-5688