Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!pesnta!wjvax!brett From: brett@wjvax.UUCP (Brett Galloway) Newsgroups: net.lang.c Subject: Use of lint (4.2bsd) Message-ID: <747@wjvax.wjvax.UUCP> Date: Thu, 14-Aug-86 19:54:11 EDT Article-I.D.: wjvax.747 Posted: Thu Aug 14 19:54:11 1986 Date-Received: Fri, 15-Aug-86 20:06:50 EDT Reply-To: brett@wjvax.UUCP (Brett Galloway) Organization: Watkins-Johnson Co., San Jose, Calif. Lines: 54 Keywords: lint, bsd I am currently working on some software in which I have created a number of object libraries, and then I use those libraries to create my executables. My question is how to use lint in an effective manner with these libraries, on a 4.2 BSD system. I would like to perform two tasks with lint. First, I would like to generate from each library directory a lint library for the use of the higher-level libraries and top-level source. Second, I would like to run lint on the source files in each library and on the top-level source files using the relevant lint libraries. Therefore, I tried the following construction in my makefile: (edited) CFILES= LIBMISCname= MISC LLIBMISC= ../llib-l$(LIBMISCname).ln LLIBS= ../llib-lGENERAL.ln LINT= lint -I../../include -DLINT $(LLIBMISC): $(CFILES) $(LINT) -C$(LIBMISCname) $? $(LLIBMISC) [1] $(LINT) -h $(CFILES) $(LLIBS) [2] @mv llib-l$(LIBMISCname).ln $(LLIBMISC) [3] The first line ([1]) supposedly lints the C source files that are out of date together with the current lint library and drops a new library llib-lMISC.ln, which I move onto the real lint library at the end (line [3]). The second line ([2]) supposedly lints ALL the source files (since a change to a given source file may make other unchanged C files fail which formerly passed) together with the other relevant lint libraries. My first question is whether my construction is correct and performs (in the best way) what I want to do. My second question concerns one incidental failure of this method. My lint documentation says that the standard C library is checked by default. Yet when I use this makefile for one particular library, I get complaints for the following: Variable number of arguments in fprintf() Variable _iob used but not defined Variable errno used but not defined Variable _ctype_ used but not defined Yet when I read /usr/lib/lint/llib-lc (the human-readable form of the standard C lint library), I find definitions for _iob, errno, and _ctype_; and fprintf() is declared as /*VARARGS*/. Why, then, is lint complaining? ------------- Brett Galloway {pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett -- ------------- Brett Galloway {pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett