Thread (7 messages) read the whole thread 7 messages, 6 authors, 2000-03-23

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 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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help