News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

gcc 4.4.3 compilation warnings

Started by yobbobandana, June 24, 2010, 12:56:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yobbobandana

Compiling simutrans experimental with gcc 4.4.3 on ubuntu 64-bit gives lots and lots of warnings.

I actually spent a couple hours yesterday going thru a lot of them. A few of them turned out to be quite serious.

I'm about halfway done and I just pushed my current changes to a new "nowarn" branch on my github. There are a couple dozen commits, basically one per warning-ish, with some similar fixes lumped together. Criticism on the fixes is welcome.

Here's an amusing example (I stopped around here so I haven't fixed this one yet)
gui/replace_frame.cc ~ line 330

uint32 present_state=get_present_state();
if (present_state==-1) {
continue;
}

This might be technically ok... if get_present_state() didn't return uint8  ;D

jamespetts

Yobbobandana,

thank you very much for looking into this. I know that we have had lots of trouble with 64-bit versions in the past, and it is very hard for me to test, since I do not have a 64-bit platform. I have been very busy these past two weeks, but hope to have time to have a go at merging this at the week-end. Thank you very much for your efforts :-)
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.