Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!akgua!sb1!mb2c!uofm-cv!cosivax!dzd From: dzd@cosivax.UUCP (Dean Douthat) Newsgroups: net.unix-wizards Subject: Another Lint Koan? Message-ID: <148@cosivax.UUCP> Date: Fri, 20-Apr-84 15:11:18 EST Article-I.D.: cosivax.148 Posted: Fri Apr 20 15:11:18 1984 Date-Received: Sun, 22-Apr-84 08:23:08 EST Lines: 47 <> In a C program which needs current date and time, the following sequence was used: #include #include #include . . . struct tm *p, *localtime(); time_t time(), time_sec; . . . time_sec = time(NULL); p = localtime(@time_sec); This was passed through lint on a VAX running Eunice. Lint nattered about the last line with: Inconsistent use of return value. [Huhh???] This lint is, presumbably, based on BSD 4.? so I tried the same code on an IBM PC running VENIX/86 which is presumably based on AT&T System III. There, lint made no complaint whatsoever. In examining lint's grammatical tables or templates or whatever they're called in file llib-lc, the pertinent line is: struct tm *localtime(c) time_t *c; { return localtime(c); } This line is *exactly the same* in both the llib-lc for VENIX/86 and that for Eunice. Is this a bug in the Eunice (= BSD??) lint, an error in the program [and therefore a bug in the VENIX/86 (= AT&T System III??) lint] or simply another lint koan, beyond the ken of all save UNIX gurus? May the Source be with you! Dean Douthat UUCP: ...!sb1!mb2c!uofm-cv!cosivax!dzd | Mail: Zahntron, Inc. Ma: (313) 995-9762 | 330 E. Liberty MCI Mail: DDOUTHAT 187-3270 | Suite 3B TWX/TELEX: 6501873270 | Ann Arbor, MI Answerback: 6501873270 MCI | 48104