Hi All,

I turned on the aggressive warnings by default following my warnings
purge.  I can disable this, but doing so would allow users to post
code with warnings without realising it, then I or others have to go
and guess at what the appropriate warning fix would be which is the
danger of introducing bugs can come in.  Fixing warnings as you
develop code highly preferable as it allows the person with the most
knowledge about the code to avoid ambiguities as they write it,
learning how to write cleaner code in the process.

My hesitancy over upping warning levels is that most warnings don't
directly map to bugs, and changing code to avoid warnings can involve
jumping through some rather odd coding strategies where the code
actually becomes less readable, less maintainable and more prone to
introducing bugs.  If you don't really understand what the warning
relates to, and what the code that producing the warning is trying to
do then there is a real risk of unintentional breaking once working
code.  "If it ain't broke don't fix it" is a good phrase to keep in
mind when thinking about fixing warnings.

In my role as maintainer I get to see the full life cycle of code,
including warning fixes that fix bugs, and ones that introduce bugs, I
include my own attempts at warning fixes as well as others.  The most
experienced engineers tend to have a better hit rate with fixing more
bugs than introducing new ones as they will be better at reading the
actual intention of the algorithm and it's caveats, but I've haven't
yet seen any engineer make no mistakes...  One can only strive for
perfection, no one can achieve it.

In this instance the Windows build is now broken due to aggressive
warnings....  so the double edge sword of warnings has raised it's
ugly head in a different aspect, the code was actually in pretty good
shape but now won't compile at all for some without changing the build
system.  Clearly this big step backwards and isn't viable, so we'll
need to pull back on the warnings levels under Windows, the suggestion
of /W3 seems a reasonable compromise so I've just change the VS
aggressive warning CmakeLists.txt script path to use this.  An svn
update will get this change.

Could VS users please do an svn update and see how the build now fares?
Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to