The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: kierongreen on March 01, 2012, 04:58:33 PM

Title: loadsave.cc compile error?
Post by: kierongreen on March 01, 2012, 04:58:33 PM
svn 5442 I seem to get a compile error in gcc:
dataobj/loadsave.cc: In member function 'const char* loadsave_t::close()':
dataobj/loadsave.cc:249:45: error: conditional expression between distinct pointer types 'gzFile' and 'FILE* {aka _IO_FILE*}' lacks a cast

A fix seemsto be changing the line from:
    if(  is_xml()  &&  saving  &&  (!is_bzip2()  ||  fd->bse==BZ_OK)
         &&  (is_zipped()  ?  fd->gzfp  :  fd->fp) ) {
to
    if(  is_xml()  &&  saving  &&  (!is_bzip2()  ||  fd->bse==BZ_OK)
         &&  (is_zipped()  ?  fd->gzfp!=NULL  :  fd->fp!=NULL) ) {
Title: Re: loadsave.cc compile error?
Post by: Dwachs on March 03, 2012, 10:55:58 AM
thanks!

in r 5473.