From d8e3225cd82f0d9ffa4528786f54a739d316fe91 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 17 Dec 2010 11:46:42 +0000 Subject: [PATCH] Fixed warnings --- src/osg/glu/libtess/normal.cpp | 3 ++- src/osg/glu/libtess/tess.h | 7 +++++-- src/osgPlugins/OpenFlight/expGeometryRecords.cpp | 2 +- src/osgPlugins/vrml/ConvertToVRML.cpp | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/osg/glu/libtess/normal.cpp b/src/osg/glu/libtess/normal.cpp index f7407dba1..2a3627f0f 100644 --- a/src/osg/glu/libtess/normal.cpp +++ b/src/osg/glu/libtess/normal.cpp @@ -78,7 +78,8 @@ static void ComputeNormal( GLUtesselator *tess, GLdouble norm[3] ) GLUvertex *v, *v1, *v2; GLdouble c, tLen2, maxLen2; GLdouble maxVal[3], minVal[3], d1[3], d2[3], tNorm[3]; - GLUvertex *maxVert[3], *minVert[3]; + GLUvertex *maxVert[3]={0,0,0}; + GLUvertex *minVert[3]={0,0,0}; GLUvertex *vHead = &tess->mesh->vHead; int i; diff --git a/src/osg/glu/libtess/tess.h b/src/osg/glu/libtess/tess.h index 7a10b14d9..7018a1a09 100644 --- a/src/osg/glu/libtess/tess.h +++ b/src/osg/glu/libtess/tess.h @@ -37,8 +37,11 @@ // #include #include - -#define GLAPIENTRY GL_APIENTRY + + +#ifndef GLAPIENTRY + #define GLAPIENTRY GL_APIENTRY +#endif #include #include "mesh.h" diff --git a/src/osgPlugins/OpenFlight/expGeometryRecords.cpp b/src/osgPlugins/OpenFlight/expGeometryRecords.cpp index de61c193c..b8167b9f7 100644 --- a/src/osgPlugins/OpenFlight/expGeometryRecords.cpp +++ b/src/osgPlugins/OpenFlight/expGeometryRecords.cpp @@ -862,7 +862,7 @@ FltExportVisitor::writeUVList( int numVerts, const osg::Geometry& geom, unsigned _fltOpt->getWriteResult().warn( warning.str() ); t2 = new osg::Vec2Array; } - else if (static_cast(t2->getNumElements()) < first + numVerts) + else if (t2->getNumElements() < first + numVerts) { std::ostringstream warning; warning << "fltexp: Invalid number of texture coordinates for unit " << idx; diff --git a/src/osgPlugins/vrml/ConvertToVRML.cpp b/src/osgPlugins/vrml/ConvertToVRML.cpp index de68a1e74..d45819b59 100644 --- a/src/osgPlugins/vrml/ConvertToVRML.cpp +++ b/src/osgPlugins/vrml/ConvertToVRML.cpp @@ -1237,7 +1237,7 @@ osg::Vec2Array* ToVRML::buildUVArray(osg::TexEnv* tEnv, osg::Vec3Array* array) { osg::ref_ptr < osg::TexEnv > texEnv = tEnv; osg::Vec2Array* uvRet = NULL; - osg::TexEnv::Mode mode = texEnv->getMode(); + // osg::TexEnv::Mode mode = texEnv->getMode(); //if (mode == osg::TexEnv::MODULATE) { // std::cout << "I know" << std::endl; //} else {