Skip to main content
Topic: a couple more gcc 4.4.3 compilation warnings (Read 4253 times) previous topic - next topic

a couple more gcc 4.4.3 compilation warnings

A couple unsigned vs signed integer comparison warnings popped back in so I made a quick patch.
This ****umes that a negative value for factory_worker_minimum_towns, factory_worker_maximum_towns, factory_worker_radius should mean no limit.

I also addressed the two "unused parameter" warnings.

All that is left after this is two warnings about "casting away constness", but in these cases that is exactly why the cast was used, so fixing them is a little less straightforward.

Re: a couple more gcc 4.4.3 compilation warnings

Reply #1
Well MSVC gives still 50+ legit warnings, GCC 2.95 still another 15 on haiku, and even MinGW GCC is not silent yet. I think silent is very much system and architecture dependent. But as long as it fixes errors ...

Re: a couple more gcc 4.4.3 compilation warnings

Reply #2
Sadly I don't have any test setup other than gcc 4.4.3 on ubuntu 64-bit.

These warnings are certainly very minor. But it is so close to warning-free on this setup that I feel addressing them is worthwhile.

I would actually be happy to try to fix the warnings for other setups given a list of them, but of course couldn't test the fixes :).

Re: a couple more gcc 4.4.3 compilation warnings

Reply #3
Sadly I don't have any test setup other than gcc 4.4.3 on ubuntu 64-bit.

These warnings are certainly very minor. But it is so close to warning-free on this setup that I feel addressing them is worthwhile.

If you want a good project, turn on -Wconversion with gcc 4.4.3 and fix all of THOSE warnings.  :-)  Those all warn of serious potential computation errors....  I was starting in on it, but it's a huge job.

Re: a couple more gcc 4.4.3 compilation warnings

Reply #4
gcc does also emit meaningless warnings, and is generally are rather silent compiler. MSVC also emits valid warnings, about still 176 for a full translate, even when GCC was silent at a point. Also -Wconversion seems to report warnings for things not compiled due to preprocessor commands. So I would no define good from the number of warnings in GCC.