About compiler warnings

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

About compiler warnings

Post by REDDemon »

I just tried to enable all warnings on irrlicht when compiling with VS, I thought it was a nice idea to fix compiler warnings, but the list is soo long. Didn't even tried GCC.

What is the policy of irrlicht around warnings? some kind of warnings that makes sense to fix? In example => unused parameters can be easily fixed by casting unused parameters to void. but conversions/casts are just too much to get rid off.

actually 33481 warnings with VS building the static library in trunk .
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: About compiler warnings

Post by CuteAlien »

The reason most warnings which are still in there are because they are real warnings. Especially those case-switch stuff which complains that some formats are not supported. Only remove those if you a) add the support for that format in that place or b) Figure out a good solution to handle it when the format is not supported.
Not sure about unused parameter right now... but we don't compile with anything above /W3.
Stuff like getting rid of unused function parameters in a no-cost-cross-platform way ... uhm, not even sure if that improves anything. I get that programmers feel like we should "clean" everything - get highest compile-warning working. We tick like that. But - sometimes it's really not worth the bother because it just risks breaking some platform where you didn't test if your workaround for one compiler doesn't mess up with another one (no-one here compiles every-time for different VS compilers, GCC compilers, on Windows, Linux, OSX and Android - unless you have a compile-server doing that for you it's near impossible doing all that).

edit: Note that there is at least one _real_ warning in W3 right now with instantiation. That one should be fixed.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: About compiler warnings

Post by REDDemon »

ok thanks! :) For know I'll just keep fixing warnings in code I touch and only if the fix is portable.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Post Reply