The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Spike on February 09, 2012, 09:39:43 PM

Title: Compiler warnings in rev 5244
Post by: Spike on February 09, 2012, 09:39:43 PM
At revision 5244.

===> CXX gui/factory_chart.cc
gui/factory_chart.cc: In constructor `factory_chart_t::factory_chart_t(const fabrik_t*)':
gui/factory_chart.cc:134: warning: 'input_count' might be used uninitialized in this function
gui/factory_chart.cc:135: warning: 'output_count' might be used uninitialized in this function
gui/factory_chart.cc: In constructor `factory_chart_t::factory_chart_t(const fabrik_t*)':
gui/factory_chart.cc:134: warning: 'input_count' might be used uninitialized in this function
gui/factory_chart.cc:135: warning: 'output_count' might be used uninitialized in this function


Potentially uninitialized can be bad, but I haven't checked if it it's really a problem or if only the compiler is worried there.
Title: Re: Compiler warnings in rev 5244
Post by: Dwachs on February 18, 2012, 10:07:49 AM
I do not get why the compiler is complaining here. After all, the variables are initialized on the mentioned lines ???