From owner-svn-src-head@freebsd.org Wed Jun 20 18:15:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27EAD100215B; Wed, 20 Jun 2018 18:15:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0A726B920; Wed, 20 Jun 2018 18:15:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 5FD0610AFAD; Wed, 20 Jun 2018 14:14:57 -0400 (EDT) Subject: Re: svn commit: r335278 - head/bin/pwd To: Eitan Adler References: <201806170514.w5H5Epts050842@repo.freebsd.org> <77224f10-7633-1122-8099-466f2a35942f@FreeBSD.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin Message-ID: <4fc7f1df-ba00-0213-d3f4-2ab5c5114b6c@FreeBSD.org> Date: Wed, 20 Jun 2018 11:14:56 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 20 Jun 2018 14:14:57 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 18:15:05 -0000 On 6/18/18 10:26 PM, Eitan Adler wrote: > On 18 June 2018 at 10:57, John Baldwin wrote: >> On 6/16/18 10:14 PM, Eitan Adler wrote: >>> Author: eadler >>> Date: Sun Jun 17 05:14:50 2018 >>> New Revision: 335278 >>> URL: https://svnweb.freebsd.org/changeset/base/335278 >>> >>> Log: >>> pwd: mark usage as dead >> >> You keep committing changes like this and ignoring e-mails about them. > > I replied both the first time and this time. I may have > (accidentally?) ignored similar emails though. The question I have is > other than the mild code churn what's the harm? > >> What broken compiler are you using that doesn't properly inherit __dead2 >> from the call to exit()? > > In this case, scan-build50 was getting annoyed. In this case, someone in a private reply suggested that marking usage 'static' is probably the better fix than marking it __dead2. If that change satisfies scan-build then I think that is a better approach. Also, the proper place for __dead2 if you were going to use it would be on the prototype, not the definition. That is, if usage() were intended to be an exported function like abort() or exit(), then you want to mark the prototype in the header as __dead2 so that the compiler will understand that those functions don't return. However, that annotation is only useful on the prototype, not the definition. -- John Baldwin