From 418dc347764fdacdbff19284890f4eb598dad79c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 7 Jan 2009 11:24:47 +0000 Subject: [PATCH] Fixed warnings --- .../osganimationmakepath.cpp | 3 ++- .../osganimationnode/osganimationnode.cpp | 4 +++- .../osganimationskinning.cpp | 4 +++- .../osganimationsolid/osganimationsolid.cpp | 4 +++- .../osganimationtimeline.cpp | 2 +- .../osganimationviewer/AnimtkViewerGUI.cpp | 4 ++-- .../AnimtkViewerKeyHandler.cpp | 2 +- .../osgdrawinstanced/osgdrawinstanced.cpp | 6 ++++-- .../osggeometryshaders/osggeometryshaders.cpp | 2 +- examples/osghud/osghud.cpp | 2 +- .../osgimagesequence/osgimagesequence.cpp | 1 - examples/osgmemorytest/osgmemorytest.cpp | 2 -- examples/osgterrain/osgterrain.cpp | 2 +- examples/osgunittests/UnitTestFramework.h | 2 ++ src/OpenThreads/win32/Win32Thread.cpp | 3 +-- src/osg/dxtctool.h | 2 ++ src/osgDB/DynamicLibrary.cpp | 1 - src/osgDB/FileUtils.cpp | 4 ++-- src/osgGA/CameraViewSwitchManipulator.cpp | 1 - src/osgGA/TrackballManipulator.cpp | 1 - src/osgGA/UFOManipulator.cpp | 2 -- src/osgManipulator/RotateCylinderDragger.cpp | 1 - src/osgManipulator/RotateSphereDragger.cpp | 1 - src/osgManipulator/Scale1DDragger.cpp | 1 - src/osgManipulator/Scale2DDragger.cpp | 1 - src/osgManipulator/Translate1DDragger.cpp | 1 - src/osgManipulator/Translate2DDragger.cpp | 1 - src/osgPlugins/OpenFlight/FltExportVisitor.h | 9 +++++++++ .../OpenFlight/LightSourcePaletteManager.h | 4 ++++ .../OpenFlight/MaterialPaletteManager.h | 4 ++++ .../OpenFlight/TexturePaletteManager.h | 3 +++ src/osgPlugins/geo/ReaderWriterGEO.cpp | 7 ++++++- src/osgPlugins/hdr/ReaderWriterHDR.cpp | 2 +- src/osgPlugins/lwo/iffparser.h | 3 +++ src/osgPlugins/lwo/lwo2parser.h | 2 ++ src/osgPlugins/mdl/MDLReader.cpp | 3 ++- src/osgPlugins/obj/OBJWriterNodeVisitor.h | 2 ++ src/osgPlugins/txp/TXPParser.cpp | 20 ------------------- src/osgPlugins/txp/TileMapper.cpp | 3 --- src/osgUtil/TriStrip_tri_stripper.h | 4 +--- src/osgViewer/PixelBufferWin32.cpp | 2 +- src/osgViewer/View.cpp | 2 -- src/osgViewer/Viewer.cpp | 2 -- 43 files changed, 67 insertions(+), 65 deletions(-) diff --git a/examples/osganimationmakepath/osganimationmakepath.cpp b/examples/osganimationmakepath/osganimationmakepath.cpp index 9c0437293..c0e2e36ea 100644 --- a/examples/osganimationmakepath/osganimationmakepath.cpp +++ b/examples/osganimationmakepath/osganimationmakepath.cpp @@ -311,7 +311,8 @@ osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode) int main(int argc, char** argv) { - osgViewer::Viewer viewer; + osg::ArgumentParser arguments(&argc, argv); + osgViewer::Viewer viewer(arguments); osgGA::TrackballManipulator* tbm = new osgGA::TrackballManipulator(); diff --git a/examples/osganimationnode/osganimationnode.cpp b/examples/osganimationnode/osganimationnode.cpp index 86e5fb7d2..7728776dd 100644 --- a/examples/osganimationnode/osganimationnode.cpp +++ b/examples/osganimationnode/osganimationnode.cpp @@ -249,7 +249,9 @@ osg::MatrixTransform* setupAnimtkNode() int main (int argc, char* argv[]) { - osgViewer::Viewer viewer; + osg::ArgumentParser arguments(&argc, argv); + osgViewer::Viewer viewer(arguments); + osgGA::TrackballManipulator* manipulator = new osgGA::TrackballManipulator(); viewer.setCameraManipulator(manipulator); diff --git a/examples/osganimationskinning/osganimationskinning.cpp b/examples/osganimationskinning/osganimationskinning.cpp index 320a9e16d..974309182 100644 --- a/examples/osganimationskinning/osganimationskinning.cpp +++ b/examples/osganimationskinning/osganimationskinning.cpp @@ -156,7 +156,9 @@ void initVertexMap(osgAnimation::Bone* b0, int main (int argc, char* argv[]) { - osgViewer::Viewer viewer; + osg::ArgumentParser arguments(&argc, argv); + osgViewer::Viewer viewer(arguments); + viewer.setCameraManipulator(new osgGA::TrackballManipulator()); osg::ref_ptr skelroot = new osgAnimation::Skeleton; diff --git a/examples/osganimationsolid/osganimationsolid.cpp b/examples/osganimationsolid/osganimationsolid.cpp index 4c594f410..6fd67c7a2 100644 --- a/examples/osganimationsolid/osganimationsolid.cpp +++ b/examples/osganimationsolid/osganimationsolid.cpp @@ -60,7 +60,9 @@ osg::ref_ptr createAxis() int main (int argc, char* argv[]) { - osgViewer::Viewer viewer; + osg::ArgumentParser arguments(&argc, argv); + osgViewer::Viewer viewer(arguments); + viewer.setCameraManipulator(new osgGA::TrackballManipulator()); osg::Group* root = new osg::Group; diff --git a/examples/osganimationtimeline/osganimationtimeline.cpp b/examples/osganimationtimeline/osganimationtimeline.cpp index b28065376..8a64f7428 100644 --- a/examples/osganimationtimeline/osganimationtimeline.cpp +++ b/examples/osganimationtimeline/osganimationtimeline.cpp @@ -109,7 +109,7 @@ struct ExampleTimelineUsage : public osgGA::GUIEventHandler _scratchNose->setCallback(_scratchNose->getNumFrames()-1, new NoseEnd); } - bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa) + bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&) { if (ea.getEventType() == osgGA::GUIEventAdapter::KEYUP) { diff --git a/examples/osganimationviewer/AnimtkViewerGUI.cpp b/examples/osganimationviewer/AnimtkViewerGUI.cpp index 82a60fca9..d9db5484b 100644 --- a/examples/osganimationviewer/AnimtkViewerGUI.cpp +++ b/examples/osganimationviewer/AnimtkViewerGUI.cpp @@ -44,13 +44,13 @@ struct ButtonFunctor: public WidgetSampler ButtonFunctor(): _speed(5) { _direction = -_speed; _previous = 0;} - bool enter(osgWidget::Event& ev) + bool enter(osgWidget::Event&) { _direction = _speed; return true; } - bool leave(osgWidget::Event& ev) + bool leave(osgWidget::Event&) { _direction = -_speed; return true; diff --git a/examples/osganimationviewer/AnimtkViewerKeyHandler.cpp b/examples/osganimationviewer/AnimtkViewerKeyHandler.cpp index 3e1d1ba40..4f5c5e6ff 100644 --- a/examples/osganimationviewer/AnimtkViewerKeyHandler.cpp +++ b/examples/osganimationviewer/AnimtkViewerKeyHandler.cpp @@ -42,7 +42,7 @@ void AnimtkKeyEventHandler::printUsage() const } -bool AnimtkKeyEventHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, +bool AnimtkKeyEventHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&, osg::Object*, osg::NodeVisitor*) { AnimtkViewerModelController& mc = AnimtkViewerModelController::instance(); diff --git a/examples/osgdrawinstanced/osgdrawinstanced.cpp b/examples/osgdrawinstanced/osgdrawinstanced.cpp index 77062f3b9..f031d087b 100644 --- a/examples/osgdrawinstanced/osgdrawinstanced.cpp +++ b/examples/osgdrawinstanced/osgdrawinstanced.cpp @@ -119,7 +119,9 @@ createStateSet() int main( int argc, char **argv ) { - // Make a scene graph consisting of a single Geode, containing + osg::ArgumentParser arguments(&argc, argv); + + // Make a scene graph consisting of a single Geode, containing // a single Geometry, and a single PrimitiveSet. osg::ref_ptr< osg::Geode > geode = new osg::Geode; @@ -142,7 +144,7 @@ int main( int argc, char **argv ) // osgDB::writeNodeFile(*geode, "instanced.osg"); - osgViewer::Viewer viewer; + osgViewer::Viewer viewer(arguments); viewer.setSceneData( geode.get() ); return viewer.run(); } diff --git a/examples/osggeometryshaders/osggeometryshaders.cpp b/examples/osggeometryshaders/osggeometryshaders.cpp index a61aadb68..7e241ca36 100644 --- a/examples/osggeometryshaders/osggeometryshaders.cpp +++ b/examples/osggeometryshaders/osggeometryshaders.cpp @@ -179,7 +179,7 @@ public: /////////////////////////////////////////////////////////////////////////// -int main( int argc, char *argv[] ) +int main( int , char * ) { osg::Geode* root( new osg::Geode ); root->addDrawable( new SomePoints ); diff --git a/examples/osghud/osghud.cpp b/examples/osghud/osghud.cpp index 421088300..f167f1f94 100644 --- a/examples/osghud/osghud.cpp +++ b/examples/osghud/osghud.cpp @@ -236,7 +236,7 @@ struct SnapeImageHandler : public osgGA::GUIEventHandler _key(key), _snapImage(si) {} - bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa) + bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&) { if (ea.getHandled()) return false; diff --git a/examples/osgimagesequence/osgimagesequence.cpp b/examples/osgimagesequence/osgimagesequence.cpp index 1b499d998..cd31658f7 100644 --- a/examples/osgimagesequence/osgimagesequence.cpp +++ b/examples/osgimagesequence/osgimagesequence.cpp @@ -315,7 +315,6 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction default: return false; } - return false; } void MovieEventHandler::getUsage(osg::ApplicationUsage& usage) const diff --git a/examples/osgmemorytest/osgmemorytest.cpp b/examples/osgmemorytest/osgmemorytest.cpp index c6f519012..aa7f69341 100644 --- a/examples/osgmemorytest/osgmemorytest.cpp +++ b/examples/osgmemorytest/osgmemorytest.cpp @@ -86,7 +86,6 @@ class ContextTest : public MemoryTest if (_pbuffer) throw "Failed to create PixelBuffer"; else throw "Failed to create GraphicsWindow"; } - return 0; } @@ -170,7 +169,6 @@ class TextureTest : public GLMemoryTest { throw "Invalid texture size of 0,0,0"; } - return 0; } diff --git a/examples/osgterrain/osgterrain.cpp b/examples/osgterrain/osgterrain.cpp index 39e3a2973..c0ba552d3 100644 --- a/examples/osgterrain/osgterrain.cpp +++ b/examples/osgterrain/osgterrain.cpp @@ -127,7 +127,7 @@ public: osgDB::Input fr; fr.attach(&fin); - bool readFilename; + bool readFilename = false; while(!fr.eof()) { diff --git a/examples/osgunittests/UnitTestFramework.h b/examples/osgunittests/UnitTestFramework.h index 71cce5eaf..6a26a0f44 100644 --- a/examples/osgunittests/UnitTestFramework.h +++ b/examples/osgunittests/UnitTestFramework.h @@ -479,6 +479,8 @@ protected: private: + TestRunner& operator = (const TestRunner&) { return *this; } + TestReport _db; // Results TestContext& _ctx; // The Global Testing Context std::vector _tests; // Specified Tests diff --git a/src/OpenThreads/win32/Win32Thread.cpp b/src/OpenThreads/win32/Win32Thread.cpp index 86f52a218..5b21d90cc 100644 --- a/src/OpenThreads/win32/Win32Thread.cpp +++ b/src/OpenThreads/win32/Win32Thread.cpp @@ -437,8 +437,7 @@ int Thread::testCancel() // ExitThread(0); throw Win32ThreadCanceled(); - return 0; - +// return 0; } diff --git a/src/osg/dxtctool.h b/src/osg/dxtctool.h index 3c8a48169..d421db6e2 100644 --- a/src/osg/dxtctool.h +++ b/src/osg/dxtctool.h @@ -92,6 +92,8 @@ public: protected: + dxtc_pixels& operator = (const dxtc_pixels&) { return *this; } + // Limitation check functions inline bool DXT1() const; inline bool DXT3() const; diff --git a/src/osgDB/DynamicLibrary.cpp b/src/osgDB/DynamicLibrary.cpp index cfc264767..5c884322f 100644 --- a/src/osgDB/DynamicLibrary.cpp +++ b/src/osgDB/DynamicLibrary.cpp @@ -154,5 +154,4 @@ DynamicLibrary::PROC_ADDRESS DynamicLibrary::getProcAddress(const std::string& p } return sym; #endif - return NULL; } diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp index 43130acf1..6b8399dec 100644 --- a/src/osgDB/FileUtils.cpp +++ b/src/osgDB/FileUtils.cpp @@ -695,9 +695,9 @@ static void appendInstallationLibraryFilePaths(osgDB::FilePathList& filepath) // path specified by the App Paths registry key. filenamechar* ptr; #ifdef OSG_USE_UTF8_FILENAME - if (ptr = _wgetenv(OSGDB_FILENAME_TEXT("PATH"))) + if ((ptr = _wgetenv(OSGDB_FILENAME_TEXT("PATH")))) #else - if (ptr = getenv("PATH")) + if ((ptr = getenv("PATH"))) #endif { // Note that on any sane Windows system, some of the paths above diff --git a/src/osgGA/CameraViewSwitchManipulator.cpp b/src/osgGA/CameraViewSwitchManipulator.cpp index ad45da407..82c501be6 100644 --- a/src/osgGA/CameraViewSwitchManipulator.cpp +++ b/src/osgGA/CameraViewSwitchManipulator.cpp @@ -67,7 +67,6 @@ bool CameraViewSwitchManipulator::handle(const GUIEventAdapter& ea,GUIActionAdap default: return false; } - return false; } osg::Matrixd CameraViewSwitchManipulator::getMatrix() const diff --git a/src/osgGA/TrackballManipulator.cpp b/src/osgGA/TrackballManipulator.cpp index 5ba05b5cb..26f4d4c6f 100644 --- a/src/osgGA/TrackballManipulator.cpp +++ b/src/osgGA/TrackballManipulator.cpp @@ -172,7 +172,6 @@ bool TrackballManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us default: return false; } - return false; } diff --git a/src/osgGA/UFOManipulator.cpp b/src/osgGA/UFOManipulator.cpp index 49e0aea5f..56cddeba6 100644 --- a/src/osgGA/UFOManipulator.cpp +++ b/src/osgGA/UFOManipulator.cpp @@ -252,8 +252,6 @@ bool UFOManipulator::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAda default: return false; } - - return false; } void UFOManipulator::getUsage(osg::ApplicationUsage& usage) const diff --git a/src/osgManipulator/RotateCylinderDragger.cpp b/src/osgManipulator/RotateCylinderDragger.cpp index 0eeaa6141..777cec792 100644 --- a/src/osgManipulator/RotateCylinderDragger.cpp +++ b/src/osgManipulator/RotateCylinderDragger.cpp @@ -146,7 +146,6 @@ bool RotateCylinderDragger::handle(const PointerInfo& pointer, const osgGA::GUIE default: return false; } - return false; } void RotateCylinderDragger::setupDefaultGeometry() diff --git a/src/osgManipulator/RotateSphereDragger.cpp b/src/osgManipulator/RotateSphereDragger.cpp index 7e65db8d5..910b3eb9a 100644 --- a/src/osgManipulator/RotateSphereDragger.cpp +++ b/src/osgManipulator/RotateSphereDragger.cpp @@ -148,7 +148,6 @@ bool RotateSphereDragger::handle(const PointerInfo& pointer, const osgGA::GUIEve default: return false; } - return false; } void RotateSphereDragger::setupDefaultGeometry() diff --git a/src/osgManipulator/Scale1DDragger.cpp b/src/osgManipulator/Scale1DDragger.cpp index 118c47706..9be970084 100644 --- a/src/osgManipulator/Scale1DDragger.cpp +++ b/src/osgManipulator/Scale1DDragger.cpp @@ -159,7 +159,6 @@ bool Scale1DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda default: return false; } - return false; } void Scale1DDragger::setupDefaultGeometry() diff --git a/src/osgManipulator/Scale2DDragger.cpp b/src/osgManipulator/Scale2DDragger.cpp index 56c6cd3a0..51fd2a49b 100644 --- a/src/osgManipulator/Scale2DDragger.cpp +++ b/src/osgManipulator/Scale2DDragger.cpp @@ -182,7 +182,6 @@ bool Scale2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda default: return false; } - return false; } void Scale2DDragger::setupDefaultGeometry() diff --git a/src/osgManipulator/Translate1DDragger.cpp b/src/osgManipulator/Translate1DDragger.cpp index f777214b0..5363937f5 100644 --- a/src/osgManipulator/Translate1DDragger.cpp +++ b/src/osgManipulator/Translate1DDragger.cpp @@ -138,7 +138,6 @@ bool Translate1DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven default: return false; } - return false; } void Translate1DDragger::setupDefaultGeometry() diff --git a/src/osgManipulator/Translate2DDragger.cpp b/src/osgManipulator/Translate2DDragger.cpp index 2d1163b1e..dc3c075e7 100644 --- a/src/osgManipulator/Translate2DDragger.cpp +++ b/src/osgManipulator/Translate2DDragger.cpp @@ -137,7 +137,6 @@ bool Translate2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven default: return false; } - return false; } void Translate2DDragger::setupDefaultGeometry() diff --git a/src/osgPlugins/OpenFlight/FltExportVisitor.h b/src/osgPlugins/OpenFlight/FltExportVisitor.h index bdc245a98..21d2e4161 100644 --- a/src/osgPlugins/OpenFlight/FltExportVisitor.h +++ b/src/osgPlugins/OpenFlight/FltExportVisitor.h @@ -238,6 +238,11 @@ struct IdHelper flt::FltExportVisitor& v_; const std::string id_; DataOutputStream* dos_; + +protected: + + IdHelper& operator = (const IdHelper&) { return *this; } + }; @@ -262,6 +267,10 @@ struct SubfaceHelper flt::FltExportVisitor& v_; bool _polygonOffsetOn; + +protected: + + SubfaceHelper& operator = (const SubfaceHelper&) { return *this; } }; } diff --git a/src/osgPlugins/OpenFlight/LightSourcePaletteManager.h b/src/osgPlugins/OpenFlight/LightSourcePaletteManager.h index 0dee959b4..997b63e93 100644 --- a/src/osgPlugins/OpenFlight/LightSourcePaletteManager.h +++ b/src/osgPlugins/OpenFlight/LightSourcePaletteManager.h @@ -66,6 +66,10 @@ class LightSourcePaletteManager ExportOptions& _fltOpt; + +protected: + + LightSourcePaletteManager& operator = (const LightSourcePaletteManager&) { return *this; } }; diff --git a/src/osgPlugins/OpenFlight/MaterialPaletteManager.h b/src/osgPlugins/OpenFlight/MaterialPaletteManager.h index aa0a4a3bb..53161895d 100644 --- a/src/osgPlugins/OpenFlight/MaterialPaletteManager.h +++ b/src/osgPlugins/OpenFlight/MaterialPaletteManager.h @@ -64,6 +64,10 @@ class MaterialPaletteManager MaterialPalette _materialPalette; ExportOptions& _fltOpt; + +protected: + + MaterialPaletteManager& operator = (const MaterialPaletteManager&) { return *this; } }; diff --git a/src/osgPlugins/OpenFlight/TexturePaletteManager.h b/src/osgPlugins/OpenFlight/TexturePaletteManager.h index a14bbfc60..8a63a7e3e 100644 --- a/src/osgPlugins/OpenFlight/TexturePaletteManager.h +++ b/src/osgPlugins/OpenFlight/TexturePaletteManager.h @@ -46,6 +46,8 @@ public: protected: + TexturePaletteManager& operator = (const TexturePaletteManager&) { return *this; } + int _currIndex; typedef std::map< const osg::Texture2D*, int > TextureIndexMap; @@ -54,6 +56,7 @@ protected: const FltExportVisitor& _nv; const ExportOptions& _fltOpt; + }; diff --git a/src/osgPlugins/geo/ReaderWriterGEO.cpp b/src/osgPlugins/geo/ReaderWriterGEO.cpp index 8a8bbbe5e..32ebd43b0 100644 --- a/src/osgPlugins/geo/ReaderWriterGEO.cpp +++ b/src/osgPlugins/geo/ReaderWriterGEO.cpp @@ -1187,9 +1187,12 @@ class ReaderGEO return; } Group *makeTextGeode(const georecord *gr) - { // in geo text is defined with a matrix included in the geo.geode (gr is this geo.geode) + { + // in geo text is defined with a matrix included in the geo.geode (gr is this geo.geode) // - we need to create this tree to render text +#if 1 return NULL; // temporary disable april 2003 +#else Group *nug=new Group; const geoField *gfd=gr->getField(GEO_DB_RENDERGROUP_MAT); // may be used in future const unsigned int imat=gfd ? gfd->getInt():0; @@ -1202,7 +1205,9 @@ class ReaderGEO nug=NULL; } return nug; +#endif } + Group *makeLightPointGeodes(const georecord *gr) { const geoField *gfd=gr->getField(GEO_DB_RENDERGROUP_MAT); Group *nug=new Group; diff --git a/src/osgPlugins/hdr/ReaderWriterHDR.cpp b/src/osgPlugins/hdr/ReaderWriterHDR.cpp index 6e1dd98e1..749a8edaa 100644 --- a/src/osgPlugins/hdr/ReaderWriterHDR.cpp +++ b/src/osgPlugins/hdr/ReaderWriterHDR.cpp @@ -260,8 +260,8 @@ public: success = HDRWriter::writeHeader(source.get(),fout); if(!success) { - return WriteResult::ERROR_IN_WRITING_FILE; // early out source = 0; // delete the temporary image + return WriteResult::ERROR_IN_WRITING_FILE; // early out } success = HDRWriter::writeRLE(source.get(), fout); diff --git a/src/osgPlugins/lwo/iffparser.h b/src/osgPlugins/lwo/iffparser.h index 659c91dbd..0376adbab 100644 --- a/src/osgPlugins/lwo/iffparser.h +++ b/src/osgPlugins/lwo/iffparser.h @@ -51,6 +51,9 @@ namespace iff inline std::ostream &os() { return os_; } private: + GenericParser& operator = (const GenericParser&) { return *this; } + + Chunk_list chunks_; std::ostream &os_; }; diff --git a/src/osgPlugins/lwo/lwo2parser.h b/src/osgPlugins/lwo/lwo2parser.h index 396975a38..d56741050 100644 --- a/src/osgPlugins/lwo/lwo2parser.h +++ b/src/osgPlugins/lwo/lwo2parser.h @@ -34,6 +34,8 @@ namespace lwo2 protected: virtual iff::Chunk *parse_chunk_data(const std::string &tag, const std::string &context, Iter it, Iter end); iff::Chunk *parse_subchunk(Iter &it, const std::string &context); + + Parser& operator = (const Parser&) { return *this; } }; diff --git a/src/osgPlugins/mdl/MDLReader.cpp b/src/osgPlugins/mdl/MDLReader.cpp index c3e614e73..fe876c4bb 100644 --- a/src/osgPlugins/mdl/MDLReader.cpp +++ b/src/osgPlugins/mdl/MDLReader.cpp @@ -42,7 +42,8 @@ MDLReader::~MDLReader() std::string MDLReader::getToken(std::string str, const char * delim, size_t & index) { - size_t start, end; + size_t start; + size_t end = std::string::npos; std::string token; // Look for the first non-occurrence of the delimiters diff --git a/src/osgPlugins/obj/OBJWriterNodeVisitor.h b/src/osgPlugins/obj/OBJWriterNodeVisitor.h index 7cf9648fd..f39fc59c7 100644 --- a/src/osgPlugins/obj/OBJWriterNodeVisitor.h +++ b/src/osgPlugins/obj/OBJWriterNodeVisitor.h @@ -136,6 +136,8 @@ class OBJWriterNodeVisitor: public osg::NodeVisitor { private: + OBJWriterNodeVisitor& operator = (const OBJWriterNodeVisitor&) { return *this; } + void processGeometry(osg::Geometry* geo, osg::Matrix& m); void processArray(const std::string& key, osg::Array* array, const osg::Matrix& m = osg::Matrix::identity(), bool isNormal = false); diff --git a/src/osgPlugins/txp/TXPParser.cpp b/src/osgPlugins/txp/TXPParser.cpp index 19ed0ce36..8cb14f233 100644 --- a/src/osgPlugins/txp/TXPParser.cpp +++ b/src/osgPlugins/txp/TXPParser.cpp @@ -955,26 +955,6 @@ void* layerRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf) _parse->setCurrentNode(osgGroup.get()); _parse->getCurrTop()->addChild(osgGroup.get()); return (void*)1; - -#if 0 - osg::Group* osgGroup = new osg::Group; - _parse->setCurrentNode(osgGroup); - _parse->getCurrTop()->addChild(osgGroup); - _parse->addLayer(osgGroup); - return (void*)1; - -#else - if (_parse->underLayerSubgraph()) return (void*)1; - - osg::ref_ptr layer = new GeodeGroup; - - _parse->setLayerGeode(layer->getGeode()); - _parse->setUnderLayerSubgraph(true); - _parse->setCurrentNode(layer.get()); - _parse->getCurrTop()->addChild(layer.get()); - - return (void *)1; -#endif } //---------------------------------------------------------------------------- diff --git a/src/osgPlugins/txp/TileMapper.cpp b/src/osgPlugins/txp/TileMapper.cpp index 78a7ac64b..94ead961f 100644 --- a/src/osgPlugins/txp/TileMapper.cpp +++ b/src/osgPlugins/txp/TileMapper.cpp @@ -308,9 +308,6 @@ bool TileMapper::canParentBeTraversed(const TileIdentifier& tid) const return (!parentHasSouthNeighour && !parentHasWestNeighour); } } - // we shouldn't get here... - - return true; } void TileMapper::checkValidityOfAllVisibleTiles() diff --git a/src/osgUtil/TriStrip_tri_stripper.h b/src/osgUtil/TriStrip_tri_stripper.h index 9bc4bfeda..d53cda117 100644 --- a/src/osgUtil/TriStrip_tri_stripper.h +++ b/src/osgUtil/TriStrip_tri_stripper.h @@ -199,9 +199,7 @@ private: friend struct _cmp_tri_interface_lt; - - - + tri_stripper& operator = (const tri_stripper&) { return *this; } typedef common_structures::graph_array triangles_graph; typedef common_structures::heap_array triangles_heap; diff --git a/src/osgViewer/PixelBufferWin32.cpp b/src/osgViewer/PixelBufferWin32.cpp index b0c26fe97..419eddded 100644 --- a/src/osgViewer/PixelBufferWin32.cpp +++ b/src/osgViewer/PixelBufferWin32.cpp @@ -665,7 +665,7 @@ bool PixelBufferWin32::realizeImplementation() if (_traits->sharedContext) { - HGLRC hglrc; + HGLRC hglrc = 0; GraphicsWindowWin32* graphicsWindowWin32 = dynamic_cast(_traits->sharedContext); if (graphicsWindowWin32) diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index 9b4a3ac30..8ec7c456a 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -1901,8 +1901,6 @@ bool View::computeIntersections(float x,float y, osgUtil::LineSegmentIntersector intersections.clear(); return false; } - - return false; } bool View::computeIntersections(float x,float y, const osg::NodePath& nodePath, osgUtil::LineSegmentIntersector::Intersections& intersections,osg::Node::NodeMask traversalMask) diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index ea6df831c..3eca6b51b 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -288,8 +288,6 @@ bool Viewer::readConfiguration(const std::string& filename) osg::notify(osg::NOTICE)<<"Error: Config file \""<