From owner-svn-src-head@freebsd.org Sun Jun 17 20:47:41 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 BF34E100975E for ; Sun, 17 Jun 2018 20:47:41 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59F7A7E8AD for ; Sun, 17 Jun 2018 20:47:41 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yb0-f174.google.com (mail-yb0-f174.google.com [209.85.213.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id 243F1D1D2 for ; Sun, 17 Jun 2018 20:47:41 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yb0-f174.google.com with SMTP id n23-v6so5287477ybg.1 for ; Sun, 17 Jun 2018 13:47:41 -0700 (PDT) X-Gm-Message-State: APt69E3aaQ+ALTPZBwr4hsWbBKC5dyZvulpicCU9wL2mUpLjxI0mwS0Y MGZa1GNaTZMoPgYmcQtuvPKn191W/qjt29+W8tZ5LQ== X-Google-Smtp-Source: ADUXVKK+yzqSFMpzSw9nFkGRmty1GIZmgHhm1uUJ2NTnY2IMM0tLHpEBhHMjohcP7p0GUnGiF3UufjZZsw+tNF44T3I= X-Received: by 2002:a25:8751:: with SMTP id e17-v6mr5152466ybn.194.1529268460624; Sun, 17 Jun 2018 13:47:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:ef50:0:0:0:0:0 with HTTP; Sun, 17 Jun 2018 13:47:10 -0700 (PDT) In-Reply-To: <20180617161907.Y1464@besplex.bde.org> References: <201806170514.w5H5Epts050842@repo.freebsd.org> <20180617161907.Y1464@besplex.bde.org> From: Eitan Adler Date: Sun, 17 Jun 2018 13:47:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335278 - head/bin/pwd To: Bruce Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" 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: Sun, 17 Jun 2018 20:47:41 -0000 On 16 June 2018 at 23:54, Bruce Evans wrote: > On Sun, 17 Jun 2018, Eitan Adler wrote: > >> Log: >> pwd: mark usage as dead >> >> Modified: >> head/bin/pwd/pwd.c >> >> Modified: head/bin/pwd/pwd.c >> >> ============================================================================== >> --- head/bin/pwd/pwd.c Sun Jun 17 03:33:29 2018 (r335277) >> +++ head/bin/pwd/pwd.c Sun Jun 17 05:14:50 2018 (r335278) >> @@ -95,7 +95,7 @@ main(int argc, char *argv[]) >> exit(0); >> } >> >> -void >> +void __dead2 >> usage(void) >> { > > > I asked you to back out a previous addition of __dead2 about 20 additions > of it ago. > > __dead2 here has no effect. The compiler can see that usage() doesn't > return if it understands __dead2 at all, since usage() ends with exit() > which is declared as __dead2. You are correct that this doesn't do much for the compiler. On the other hand it does shut up clang and some other static analyzers. It also doesn't cause any harm, so I don't see why it should be removed. Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams