problem with compiling BrDb.cxx

From: Stephen J. Sanders (ssanders@ukans.edu)
Date: Sun Mar 18 2001 - 21:47:45 EST

  • Next message: Christian Holm Christensen: "Re: problem with compiling BrDb.cxx"

    Hi,  I recently checked out  the complete brat to work on the revised
    mult code.  However, when compiling BrDb.cxx the make  stopped with:
    
    cc1plus: warnings being treated as errors
    BrDb.cxx: In method `Bool_t BrDb::ReadBratDbRc(const char *, const char
    *, char
    *&, char *&)':
    BrDb.cxx:249: warning: comparison is always false due to limited range
    of data t
    ype
    make[1]: *** [../obj/linux/BrDb.o] Error 1
    make[1]: Leaving directory `/home/sanders/Brahms/brat/db/src'
    
    The problem statement is:
    
        if (c == EOF) break;
    
    I was able to fix the problem by explicitly casting EOF with
    
        if(c==(char) EOF) break;
    
    The rest of the build went OK.
    I don't want to commit this change to the cvs without having a better
    idea  of possilbe consequences.
    Christian, is the casting OK?  I'm running a LinuxPPC system on a mac
    with the 2.4.2 kernel. and
    version 2.95.3 of g++.
    
    ...steve
    



    This archive was generated by hypermail 2b29 : Sun Mar 18 2001 - 21:48:56 EST