From owner-svn-src-all@freebsd.org Mon May 21 22:34:05 2018 Return-Path: Delivered-To: svn-src-all@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 DF4F7EA8170; Mon, 21 May 2018 22:34:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (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 8F43074583; Mon, 21 May 2018 22:34:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 5B2B719741; Mon, 21 May 2018 22:34:05 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333962 - head/usr.bin/top Date: Mon, 21 May 2018 14:53:51 -0700 Message-ID: <305462962.mZrrAP8ExE@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201805210440.w4L4eKCh001684@repo.freebsd.org> References: <201805210440.w4L4eKCh001684@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 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: Mon, 21 May 2018 22:34:06 -0000 On Monday, May 21, 2018 04:40:20 AM Eitan Adler wrote: > Author: eadler > Date: Mon May 21 04:40:20 2018 > New Revision: 333962 > URL: https://svnweb.freebsd.org/changeset/base/333962 > > Log: > top(1): further unconditionally assume we're on FreeBSD > > Modified: > head/usr.bin/top/loadavg.h > head/usr.bin/top/machine.c > head/usr.bin/top/machine.h > head/usr.bin/top/top.c > > Modified: head/usr.bin/top/top.c > ============================================================================== > --- head/usr.bin/top/top.c Mon May 21 04:32:14 2018 (r333961) > +++ head/usr.bin/top/top.c Mon May 21 04:40:20 2018 (r333962) > @@ -403,7 +403,7 @@ char *argv[]; > if (getuid() == 0) > { > /* be very un-nice! */ > - (void) nice(-20); > + nice(-20); FreeBSD doesn't support (void) casts? (That's the only reasoning I can infer from the log message.) I believe that using these provides hints to static analyzers to indicate that normally the return value should be checked for certain functions but it is not needed in specific cases (permitting the analyzer to warn about missing checks of return values in other cases). -- John Baldwin