From owner-svn-src-all@FreeBSD.ORG Sun Jul 10 05:30:41 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63185106564A; Sun, 10 Jul 2011 05:30:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id F32508FC0A; Sun, 10 Jul 2011 05:30:40 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p6A5P724012246 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sat, 9 Jul 2011 23:25:07 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4E19321F.1090801@FreeBSD.org> Date: Sat, 9 Jul 2011 23:25:13 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201107080135.p681ZXZu087112@svn.freebsd.org> <4E19321F.1090801@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sat, 09 Jul 2011 23:25:08 -0600 (MDT) Cc: Tai-hwa Liang , Craig Rodrigues , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r223854 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2011 05:30:41 -0000 On Jul 9, 2011, at 11:01 PM, Doug Barton wrote: > On 07/08/2011 15:29, Warner Losh wrote: >>=20 >> On Jul 8, 2011, at 2:25 AM, Craig Rodrigues wrote: >>=20 >>> Hi, >>>=20 >>> While not ideal, would it be possible consider setting WARNS to set >>> different levels >>> depending on what the value of ${MACHINE_ARCH} is? >>>=20 >>> Something like: >>>=20 >>> .if ${MACHINE_ARCH} !=3D "sparc64" (or whatever the correct value = is) >>> WARNS ?=3D 0 >>> .else >>> WARNS ?=3D 2 >>> .endif >>>=20 >>> This would at least be an attempt to prevent people from adding new >>> code to libstand which introduce new warnings. >>=20 >> We've avoided this in the tree, and I'd urge against it. It gives a >> false sense of security and tends to make problems linger. I'd like = to >> strongly argue against it. >=20 > If I'm missing something here, feel free to correct me. But what you > seem to be saying is that WARNS should be kept down to the LCD, is = that > right? Yes. > If so, wouldn't that mean that the problems are just going to be > ignored perpetually? No. History has shown that they are properly fixed on all platforms in = the fullness of time. > ISTM that what Craig is proposing gives us the benefits of noticing > breakage faster at higher WARNS levels for those arches that support > them, while allowing interested folks to pick up the work on the > less-well-supported arches as time allows. I don't see a downside to = that. Yes. I understand Craig's theory. The down-side is that people just if = !mips or if !arm stuff out thinking it is safe to do so, when in fact = the warnings are telling you about real (or potentially real) bugs on = the platform in question. So instead of making things safer, you are = really masking the bugs. Better to fix the warnings on those platforms = than to pretend that WARNS=3D9 on i386 is "good enough" and that you can = bump that down to WARNS=3D1 when you encounter something you don't = understand. So, it might catch one or two trivial things, but if we do it throughout = the tree I worry that the very good efforts to raise the warnings for = all ports will come to a stop and we'll wind up with fewer bug fixes for = the platforms that complain. Having the low WARNS=3D today motivates = people to fix stuff... Warner=