News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

loadsave.cc compile error?

Started by kierongreen, March 01, 2012, 04:58:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kierongreen

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) ) {

Dwachs

Parsley, sage, rosemary, and maggikraut.