Subject: bin/ps compile error?
To: current users <current-users@NetBSD.ORG>
From: Paul Goyette <paul@pgoyette.bdt.com>
List: current-users
Date: 10/26/1996 15:31:12
I got the following while trying to do a `make all' today:

===> bin/ps
cc -O  -Werror  -c fmt.c
cc -O  -Werror  -c keyword.c
cc -O  -Werror  -c nlist.c
cc -O  -Werror  -c print.c
cc1: warnings being treated as errors
print.c: In function `state':
print.c:241: warning: comparison is always 0 due to limited range of data type
*** Error code 1

Stop.


Here's the relevant section of ps/print.c

	if (p->p_nice < NZERO)
		*cp++ = '<';
	else if (p->p_nice > NZERO)
		*cp++ = 'N';


Sinze p->p_nice is defined as a u_char in sys/proc.h and NZERO is defined 
in sys/param.h as 0, p->p_nice couldn't possibly be < NZERO.

This is all from sources supped -current as of this morning (10/26).