From owner-freebsd-arch Sat Mar 2 23: 7:43 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id B4C7037B41A; Sat, 2 Mar 2002 23:07:39 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id SAA04583; Sun, 3 Mar 2002 18:07:37 +1100 Date: Sun, 3 Mar 2002 18:08:19 +1100 (EST) From: Bruce Evans X-X-Sender: To: "David O'Brien" Cc: Subject: Re: Warning and lint(1) fixes. Review please. In-Reply-To: <20020302125958.B58520@dragon.nuxi.com> Message-ID: <20020303180145.T64083-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 2 Mar 2002, David O'Brien wrote: > On Sat, Mar 02, 2002 at 06:36:13AM +1100, Bruce Evans wrote: > > > Index: i386/include/pcpu.h > > > =================================================================== > > > RCS file: /home/ncvs/src/sys/i386/include/pcpu.h,v > > > retrieving revision 1.32 > > > diff -u -d -r1.32 pcpu.h > > > --- i386/include/pcpu.h 11 Dec 2001 23:33:40 -0000 1.32 > > > +++ i386/include/pcpu.h 28 Feb 2002 10:44:43 -0000 > > > @@ -32,8 +32,22 @@ > > > #ifdef _KERNEL > > > > > > #ifndef __GNUC__ > > > -#error gcc is required to use this file > > > -#endif > > > + > > > +#ifndef lint > > > +#error gcc or lint is required to use this file > > > +#else /* lint */ > > > +#define __PCPU_PTR(name) > > > +#define __PCPU_GET(name) > > > +#define __PCPU_SET(name, val) > > > > I can't think of any good way to handle this. > > remove the #ifndef lint wrapping and teach lint to ignore #error. I mean for the whole file. We need to mess it up by supplying lots of dummy macros for the lint case, so that lint doesn't find errors in everything that uses the macros. But this weakens lint's checking significantly (much more than for dummy functions to replace inline ones). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message