swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

v1.0.3: another warning


From: ludo
Subject: v1.0.3: another warning
Date: Mon, 22 Sep 1997 10:15:48 -0600

Hi all, me again

I found another warning, this one looks more serious:

InFile.m: In function `_i_InFile__getChar_':
InFile.m:107: warning: comparison is always 0 due to limited range of data type
InFile.m: In function `_i_InFile__skipLine':
InFile.m:125: warning: comparison is always 0 due to limited range of data type

source-code =
-(int) getChar: (char *) aChar {
  (*aChar) = fgetc(theFile) ;
  if( (*aChar) == EOF)                  //line 107
    return 0 ;
  else
    return 1 ;
}

and

-(int) skipLine {
  char aChar ;

  while(1){
    aChar = fgetc(theFile) ;
    if(aChar == EOF)            //line 125
      return 0 ;
    if(aChar == '\n')
      return 1 ;
  }
}


I haven't really looked into it (I don't use Infiles), I just noticed it.

Bye (again), Ludo.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]