limited range of data error

David A. Gatwood dgatwood at deepspace.mklinux.org
Tue Mar 21 12:54:41 EST 2000


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 2234

I 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/





More information about the Linuxppc-dev mailing list