Skip to main content
Topic: Unused variable sync_step_counter (Read 2362 times) previous topic - next topic

Unused variable sync_step_counter

Compiling simutrans with gcc 4.3 on a debian squeeze I get a warning about an unused variable on simhalt.cc:823 - sync_step_counter. Grepping for the variable name in src gives no other matches than this occurrence.

While the presence of an unused variable is of no big consequence in itself, since it might constitute an indication of some other typo or such, I still wanted to bring it to your attention. Removing the variable does not prevent compiling nor starting the game, but further than that I have not looked.

A svn blame yields the following:
Quote
2627     prissi    uint8 sync_step_counter = 1;
which was committed with the following comment:
Quote
FIX: make the game a little more responsive when dealing with extremly large stations

I attach a mini-patch that simply removes the variable declaration.

 

Re: Unused variable sync_step_counter

Reply #1
This was a leftover from a too difficult way to make the game more responsive. Thank you.