Subject: Re: bin/ps compile error?
To: Paul Goyette <paul@pgoyette.bdt.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 10/26/1996 15:33:03
On Sat, 26 Oct 1996 15:31:12 -0700 (PDT) 
 Paul Goyette <paul@pgoyette.bdt.com> wrote:

 > I got the following while trying to do a `make all' today:

Did you re-install your include files before you tried building ps?
The type of p_nice changed, and ps had to be taught how to deal with
that...

 > 
 > ===> 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).

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939