Re: limited range of data error
From: David A. Gatwood <hidden>
Date: 2000-03-21 01:54:41
On Mon, 20 Mar 100, Rhys wrote:
When i try to compile i get these errors:
act_comm.c:2234: warning: comparison is always true due to limited range of data type
char BUFF[MAX_STRING_LENGTH];
if ((rpfile = fopen(ASCTITTLE_FILE, "r")) !=NULL) {
while (( BUFF[num]=fgetc(rpfile)) != OEF) // Line 2234I assume that's EOF, and not OEF. Anyway, this can be fixed by making BUFF[] be an array of signed char instead of just char. Ran into the same issue this past wekend in some code I was writing. Later, David --------------------------------------------------------------------- A logician trying to explain logic to a programmer is like a cat trying to explain to a fish what it's like to be wet. -- unknown, possibly Franklin Veaux ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/