Date: Mon, 21 May 2018 14:53:51 -0700 From: John Baldwin <jhb@freebsd.org> To: Eitan Adler <eadler@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333962 - head/usr.bin/top Message-ID: <305462962.mZrrAP8ExE@ralph.baldwin.cx> In-Reply-To: <201805210440.w4L4eKCh001684@repo.freebsd.org> References: <201805210440.w4L4eKCh001684@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?305462962.mZrrAP8ExE>