diff --git a/CMakeLists.txt b/CMakeLists.txt index 2aecdbb72..d42b0191b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ set(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} assimp-dev) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) add_definitions(-fPIC) # this is a very important switch and some libraries seem now to have it.... ## hide all not-exported symbols - add_definitions( -fvisibility=hidden ) + add_definitions( -fvisibility=hidden -Wall ) endif() INCLUDE (FindPkgConfig) diff --git a/code/FBXDocument.cpp b/code/FBXDocument.cpp index f5ad5bf61..98bb7ebe1 100644 --- a/code/FBXDocument.cpp +++ b/code/FBXDocument.cpp @@ -465,8 +465,8 @@ Geometry::~Geometry() // ------------------------------------------------------------------------------------------------ Document::Document(const Parser& parser, const ImportSettings& settings) -: parser(parser) -, settings(settings) +: settings(settings) +, parser(parser) { // cannot use array default initialization syntax because vc8 fails on it for (unsigned int i = 0; i < 7; ++i) { @@ -707,9 +707,9 @@ std::vector Document::GetConnectionsByDestinationSequenced(ui // ------------------------------------------------------------------------------------------------ Connection::Connection(uint64_t insertionOrder, uint64_t src, uint64_t dest, const std::string& prop, const Document& doc) : insertionOrder(insertionOrder) +, prop(prop) , src(src) , dest(dest) -, prop(prop) , doc(doc) { ai_assert(doc.Objects().find(src) != doc.Objects().end()); diff --git a/code/FBXMeshGeometry.cpp b/code/FBXMeshGeometry.cpp index 631df06fa..111e6aa18 100644 --- a/code/FBXMeshGeometry.cpp +++ b/code/FBXMeshGeometry.cpp @@ -72,9 +72,6 @@ MeshGeometry::MeshGeometry(uint64_t id, const Element& element, const std::strin // optional Mesh elements: const ElementCollection& Layer = sc->GetCollection("Layer"); - const ElementCollection& LayerElementMaterial = sc->GetCollection("LayerElementMaterial"); - const ElementCollection& LayerElementUV = sc->GetCollection("LayerElementUV"); - const ElementCollection& LayerElementNormal = sc->GetCollection("LayerElementNormal"); std::vector tempVerts; ReadVectorDataArray(tempVerts,Vertices); diff --git a/code/FBXParser.cpp b/code/FBXParser.cpp index 39e7f7657..d1737a2e8 100644 --- a/code/FBXParser.cpp +++ b/code/FBXParser.cpp @@ -165,9 +165,9 @@ Scope::~Scope() // ------------------------------------------------------------------------------------------------ Parser::Parser (const TokenList& tokens) : tokens(tokens) -, cursor(tokens.begin()) -, current() , last() +, current() +, cursor(tokens.begin()) { root.reset(new Scope(*this,true)); } @@ -276,7 +276,6 @@ float ParseTokenAsFloat(const Token& t, const char*& err_out) return 0.0f; } - const char* inout = t.begin(); // need to copy the input string to a temporary buffer // first - next in the fbx token stream comes ',', diff --git a/code/FBXProperties.cpp b/code/FBXProperties.cpp index 74c5c84f6..e72817aa0 100644 --- a/code/FBXProperties.cpp +++ b/code/FBXProperties.cpp @@ -129,15 +129,15 @@ std::string PeekPropertyName(const Element& element) // ------------------------------------------------------------------------------------------------ PropertyTable::PropertyTable() -: element() -, templateProps() +: templateProps() +, element() { } // ------------------------------------------------------------------------------------------------ PropertyTable::PropertyTable(const Element& element, boost::shared_ptr templateProps) -: element(&element) -, templateProps(templateProps) +: templateProps(templateProps) +, element(&element) { const Scope& scope = GetRequiredScope(element); BOOST_FOREACH(const ElementMap::value_type& v, scope.Elements()) { diff --git a/code/IFCMaterial.cpp b/code/IFCMaterial.cpp index ab469b392..081dd7e19 100644 --- a/code/IFCMaterial.cpp +++ b/code/IFCMaterial.cpp @@ -123,10 +123,10 @@ void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionDat } } } - } + } /* else if (const IFC::IfcSurfaceStyleWithTextures* tex = sel2->ResolveSelectPtr(conv.db)) { // XXX - } + } */ } } diff --git a/code/M3Importer.cpp b/code/M3Importer.cpp index f26e7805e..f13a5e885 100644 --- a/code/M3Importer.cpp +++ b/code/M3Importer.cpp @@ -113,8 +113,7 @@ void M3Importer::InternReadFile( const std::string& pFile, aiScene* pScene, IOSy } m_Buffer.resize( filesize ); - size_t readsize = file->Read( &m_Buffer[ 0 ], sizeof( unsigned char ), filesize ); - ai_assert( readsize == filesize ); + file->Read( &m_Buffer[ 0 ], sizeof( unsigned char ), filesize ); m_pHead = reinterpret_cast( &m_Buffer[ 0 ] ); m_pRefs = reinterpret_cast( &m_Buffer[ 0 ] + m_pHead->ofsRefs ); diff --git a/code/XGLLoader.cpp b/code/XGLLoader.cpp index 24d6d8487..8e8424726 100644 --- a/code/XGLLoader.cpp +++ b/code/XGLLoader.cpp @@ -394,7 +394,7 @@ aiNode* XGLImporter::ReadObject(TempScope& scope, bool skipFirst, const char* cl // XXX } else if (s == "meshref") { - const int id = ReadIndexFromText(); + const unsigned int id = static_cast( ReadIndexFromText() ); std::multimap::iterator it = scope.meshes.find(id), end = scope.meshes.end(); if (it == end) { diff --git a/contrib/poly2tri/poly2tri/common/shapes.cc b/contrib/poly2tri/poly2tri/common/shapes.cc index 77bafa150..f5fe29669 100644 --- a/contrib/poly2tri/poly2tri/common/shapes.cc +++ b/contrib/poly2tri/poly2tri/common/shapes.cc @@ -119,10 +119,10 @@ void Triangle::ClearDelunayEdges() Point* Triangle::OppositePoint(Triangle& t, Point& p) { Point *cw = t.PointCW(p); - double x = cw->x; - double y = cw->y; - x = p.x; - y = p.y; + //double x = cw->x; + //double y = cw->y; + //x = p.x; + //y = p.y; return PointCW(*cw); } diff --git a/contrib/poly2tri/poly2tri/sweep/sweep.cc b/contrib/poly2tri/poly2tri/sweep/sweep.cc index 883cde619..130e06ed4 100644 --- a/contrib/poly2tri/poly2tri/sweep/sweep.cc +++ b/contrib/poly2tri/poly2tri/sweep/sweep.cc @@ -754,7 +754,7 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& Sweep::~Sweep() { // Clean up memory - for(int i = 0; i < nodes_.size(); i++) { + for(unsigned int i = 0; i < nodes_.size(); i++) { delete nodes_[i]; }