HI David, Over the weekend I've been thinking about OSG_UNUSED macro approach for quietening down irrelevant warnings and feel that it's just bad programming. I believe it's fundamentally wrong to be adding code to program for the sole purpose of quietening down warnings so am going to be reverting all the code assocatied with and will not be merging any other code. This practice is a bad practice and don't wish to see it promoted in the OSG core.
Warnings are there to help spot bugs, having to add code to fix inappropriate warnings makes the code less readable, and with added line you add the possibility of introducing a bug, and what to say that todays hack around a warning doesn't get flagged as a warning in the next rev of a compiler. I'm miffed with having to jump through hoops to fix what I now consider is broken code, and regret not rejecting the submission in the first place. The right thing to do with warnings that are producing warnings that can't be fixed directly without hacks is to disable the warning, not by hacking the code but fixing the compiler settings. If you want to protest ask yourself this simple question, how many bugs have you fixed with this blitz on warnings? Next question is how many bugs could you have fixed in the same time you spent squashing these useful warnings? Robert. On 30 June 2013 02:48, David Callu <[email protected]> wrote: > Hi Robert, > > Here the second pass of warning fix > > all archive are in the form src/... or include/... or example/... > > > > example_refactoring.txz fix warning for osgsidebyside example. > This example define a class derived from osgGA::GUIEventHandler and > osg::NodeVisitor. > This is a very bad example of double inheritance. the warning say that > osg::Referenced base class > is inaccessible. I fix this by create 2 class one derived from > osgGA::GUIEventHandler, a second derived > from osg::NodeVisitor. > > > osgPlugin_OpenFlight fix some warning and replace ® by (R). > > > other_wrapper_warning.txz fix warning for REGISTER_OBJECT_WRAPPER macro. > I don't use OSG_UNUSED any more, but I redefined a macro > REGISTER_EMPTY_OBJECT_WRAPPER > > > wrapper_warning.txz fix warning in osgWrapper when function's parameter is > not used. > > > to fix warning when variable is used in assert and not in code, > I define an OSG_ASSERT in osg/Export > > > I now build without warning with GCC and Clang compilator, excepted for > ffmpeg plugin > > > Cheers > David > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
