From owner-svn-src-all@freebsd.org Sun May 29 10:39:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16F7DB52191 for ; Sun, 29 May 2016 10:39:28 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (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)) by mx1.freebsd.org (Postfix) with ESMTPS id CCB731F6C for ; Sun, 29 May 2016 10:39:27 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22a.google.com with SMTP id x189so141784831ywe.3 for ; Sun, 29 May 2016 03:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=LvHWgfBPWbgzqtnnBRuVZCVittn/r3Yy0mQ6/QxmD18=; b=JcRVmkqdThU2hqWCMKtsiWHalOhP1uOfYNl3bmy2+6xufgWjMEhbe5yf/tqqa1NYxf K73yZt4seEDZN89W1YtxN+0iO+kmAm8CaULnBbd162nqCMVEPbavn5y+NqC0PHVMRD3t H0rD1lzxh0hk1LDbfFPV1h3QWQD+/OQAXFT7znpH9dWgHrR+yAW/WIB01nICFdun8UTF Cp9wa7lGBKuxyxqIhQi3VTGf7L8y2dShmBWPHJrFNOsUw1crB0vSv9M32uEGi1n9NVSq +xZ1p57cfX3k1uqLpmQzxzMLgGiFod+WgfKchFlUUnD6yC1aUVlJpsQ4Nbfd8O48IsDp l0Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=LvHWgfBPWbgzqtnnBRuVZCVittn/r3Yy0mQ6/QxmD18=; b=Buoyo/9b2u3tw/nymVdI7aXlBLlWYMhg/YOf21dN1nJkmKAWgYiTtIJ1HyUqZe+gPK 4qzhOewVihBXLyZDX/ycMm7vq1YMhLew/wPl1MxPHzwWsOQV6aa2mYZoVXvmAQaabPDp AIpFfHuYXPrYpJzPKfJFWNw5sIg4fbjSeolXrhdOsDJVhpyvTXABYS1LMUEqlrzownJT KDb6OkAgvgjBum6/y1U9NXbMHC9VpsyBrFNQnLas95fE13+fijvdrX0VTdQewFvAs9/9 Lky3BjexdqWplIdLd5Fisz/yEws/b0ZXfvIE+wxUNoDrxIfd1a8xdLvIOO/zO3sBGCQy HJMg== X-Gm-Message-State: ALyK8tIqKZN1ElQhJ8I4gQCXn3/HUYOHX6BkLHfig8ucWTh34LcC7cZ507CnewpqE8B/TxLz52G9uEtlv7sFKQ== MIME-Version: 1.0 X-Received: by 10.129.53.70 with SMTP id c67mr14846757ywa.149.1464518367068; Sun, 29 May 2016 03:39:27 -0700 (PDT) Received: by 10.13.201.199 with HTTP; Sun, 29 May 2016 03:39:27 -0700 (PDT) In-Reply-To: <20160529171235.A1958@besplex.bde.org> References: <201605290418.u4T4IlWI057643@repo.freebsd.org> <20160529171235.A1958@besplex.bde.org> Date: Sun, 29 May 2016 12:39:27 +0200 Message-ID: Subject: Re: svn commit: r300935 - head/usr.sbin/rpc.statd From: Ed Schouten To: Bruce Evans Cc: Garrett Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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, 29 May 2016 10:39:28 -0000 Hi Bruce, Garrett, 2016-05-29 9:31 GMT+02:00 Bruce Evans : > On Sun, 29 May 2016, Garrett Cooper wrote: > >> Log: >> Mark out_of_mem(..) and usage(..) with __dead2 as they both directly call >> exit >> as a hint to static analysis tools > > This is bogus for usage() since it is static so only very broken static > analyis tools can't see its full details. Exactly. I think it's important to keep in mind what the intent of this attribute is: to pass compiler optimization state across compilation units. For static functions, this has absolutely no meaning. Also, as we already live in the year 2016, please use the following construct in case you really want to mark this function as no-return: #include static noreturn void usage(void) { ... } In public header files where you likely don't want to pollute the namespace, use _Noreturn instead. Thanks, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717