From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 10:18:03 2012 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4875D106564A for ; Wed, 19 Sep 2012 10:18:03 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp2.one.com (csmtp2.one.com [91.198.169.22]) by mx1.freebsd.org (Postfix) with ESMTP id 08B7F8FC08 for ; Wed, 19 Sep 2012 10:18:02 +0000 (UTC) Received: from [192.168.1.18] (unknown [217.157.7.221]) by csmtp2.one.com (Postfix) with ESMTPA id 13AA1307863E for ; Wed, 19 Sep 2012 10:18:02 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: Erik Cederstrand In-Reply-To: <63FCC95F-7D73-423D-892D-DB5D75BCEBE7@cederstrand.dk> Date: Wed, 19 Sep 2012 12:18:01 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <63FCC95F-7D73-423D-892D-DB5D75BCEBE7@cederstrand.dk> To: FreeBSD Hackers X-Mailer: Apple Mail (2.1486) Cc: Subject: Re: NDEBUG and assert() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 10:18:03 -0000 Den 19/09/2012 kl. 11.19 skrev Erik Cederstrand : > The below below patch will let the analyzer reason correctly about the = code, and removes the report mentioned above (and a handful others in = ncurses). It doesn't touch contrib code, but I'm not happy about = changing include/assert.h since it's used so many other places. Any = other ideas for how to best solve this? An alternative that doesn't touch assert.h but contains a patch to = /contrib: Erik Index: lib/ncurses/ncurses/ncurses_cfg.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/ncurses/ncurses/ncurses_cfg.h (revision 240638) +++ lib/ncurses/ncurses/ncurses_cfg.h (working copy) @@ -145,7 +145,6 @@ #define NCURSES_NO_PADDING 1 #define NCURSES_PATHSEP ':' #define NCURSES_VERSION_STRING "5.7.20081102" -#define NDEBUG 1 #define RETSIGTYPE void #define SIG_ATOMIC_T volatile sig_atomic_t #define SIZEOF_SIGNED_CHAR 1 Index: lib/ncurses/config.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/ncurses/config.mk (revision 240638) +++ lib/ncurses/config.mk (working copy) @@ -27,8 +27,6 @@ =20 CFLAGS+=3D -Wall =20 -CFLAGS+=3D -DNDEBUG - CFLAGS+=3D -DHAVE_CONFIG_H =20 # everyone needs this Index: contrib/ncurses/include/ncurses_defs =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- contrib/ncurses/include/ncurses_defs (revision 240638) +++ contrib/ncurses/include/ncurses_defs (working copy) @@ -171,7 +171,6 @@ NCURSES_EXT_FUNCS NCURSES_NO_PADDING NCURSES_PATHSEP ':' -NDEBUG NEED_PTEM_H NO_LEAKS PURE_TERMINFO