From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 28 23:25:36 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 652BE275 for ; Sun, 28 Oct 2012 23:25:36 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id D082E8FC0A for ; Sun, 28 Oct 2012 23:25:23 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id q9SNPG1J093260 for ; Sun, 28 Oct 2012 17:25:22 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q9SNOqL1003825; Sun, 28 Oct 2012 17:24:52 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: opensolaris B_TRUE and B_FALSE From: Ian Lepore To: Erik Cederstrand In-Reply-To: <560EA79C-502B-418C-8BF1-A1BC28E05FD1@cederstrand.dk> References: <560EA79C-502B-418C-8BF1-A1BC28E05FD1@cederstrand.dk> Content-Type: text/plain; charset="us-ascii" Date: Sun, 28 Oct 2012 17:24:52 -0600 Message-ID: <1351466692.1123.346.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 23:25:36 -0000 On Mon, 2012-10-29 at 00:02 +0100, Erik Cederstrand wrote: > Hello, > > I'm looking at this Clang analyzer report: http://scan.freebsd.your.org/freebsd-head/WORLD/2012-10-24-amd64/report-uH6BjZ.html.gz#EndPath Apart from the actual error, which is a apse positive, it seems like Clang can't find the macro definitions for B_TRUE and B_FALSE (if it did, hovering over them would show the macro definition). > > These are defined in sys/cddl/compat/opensolaris/sys/types.h as an enum of type boolean_t as long as _KERNEL is not defined. The only definition for boolean_t I can find is in sys/sys/types.h but it's only defined if _KERNEL is defined. > > I'm sure that ZFS wouldn't work if B_TRUE or B_FALSE were undefined, I just can't figure out where it's happening. I need a hint :-) > > Thanks, > Erik Look further up in sys/cddl/compat/opensolaris/sys/types.h, they're also defined (as macros rather than enum) in the KERNEL case. They're also defined (as enum) in sys/gnu/fs/xfs/xfs_types.h. (Once again, SlickEdit pays for itself by answering with one right-click a question that would have been a pain to use grep for.) -- Ian