Date: Sun, 3 Mar 2002 18:08:19 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: "David O'Brien" <obrien@FreeBSD.ORG> Cc: <arch@FreeBSD.ORG> Subject: Re: Warning and lint(1) fixes. Review please. Message-ID: <20020303180145.T64083-100000@gamplex.bde.org> In-Reply-To: <20020302125958.B58520@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020303180145.T64083-100000>