svn commit: r333962 - head/usr.bin/top

John Baldwin jhb at freebsd.org
Mon May 21 22:34:06 UTC 2018


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


More information about the svn-src-head mailing list