diff --git a/code/3DSConverter.cpp b/code/3DSConverter.cpp index 417e807f3..f3d2bf6f8 100644 --- a/code/3DSConverter.cpp +++ b/code/3DSConverter.cpp @@ -433,7 +433,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene* pcOut) // ------------------------------------------------------------------------------------------------ // Add a node to the scenegraph and setup its final transformation void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut, - D3DS::Node* pcIn, aiMatrix4x4& absTrafo) + D3DS::Node* pcIn, aiMatrix4x4& /*absTrafo*/) { std::vector iArray; iArray.reserve(3); diff --git a/code/3DSLoader.cpp b/code/3DSLoader.cpp index 505a0321a..559cab7c6 100644 --- a/code/3DSLoader.cpp +++ b/code/3DSLoader.cpp @@ -117,7 +117,7 @@ void Discreet3DSImporter::GetExtensionList(std::set& extensions) // ------------------------------------------------------------------------------------------------ // Setup configuration properties -void Discreet3DSImporter::SetupProperties(const Importer* pImp) +void Discreet3DSImporter::SetupProperties(const Importer* /*pImp*/) { // nothing to be done for the moment } @@ -1373,6 +1373,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D* out, // Skip unknown chunks, hope this won't cause any problems. return ParseColorChunk(out,acceptPercent); }; + (void)bGamma; } #endif // !! ASSIMP_BUILD_NO_3DS_IMPORTER diff --git a/code/B3DImporter.cpp b/code/B3DImporter.cpp index dbde8769c..d09149401 100644 --- a/code/B3DImporter.cpp +++ b/code/B3DImporter.cpp @@ -62,7 +62,7 @@ using namespace std; //#define DEBUG_B3D // ------------------------------------------------------------------------------------------------ -bool B3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const{ +bool B3DImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const{ size_t pos=pFile.find_last_of( '.' ); if( pos==string::npos ) return false; diff --git a/code/BVHLoader.cpp b/code/BVHLoader.cpp index 4423e5771..0330113f2 100644 --- a/code/BVHLoader.cpp +++ b/code/BVHLoader.cpp @@ -290,7 +290,7 @@ void BVHLoader::ReadNodeChannels( BVHLoader::Node& pNode) // ------------------------------------------------------------------------------------------------ // Reads the motion data -void BVHLoader::ReadMotion( aiScene* pScene) +void BVHLoader::ReadMotion( aiScene* /*pScene*/) { // Read number of frames std::string tokenFrames = GetNextToken(); diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp index eab2e3ae9..4d37c4ac5 100644 --- a/code/BaseImporter.cpp +++ b/code/BaseImporter.cpp @@ -98,7 +98,7 @@ aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile, } // ------------------------------------------------------------------------------------------------ -void BaseImporter::SetupProperties(const Importer* pImp) +void BaseImporter::SetupProperties(const Importer* /*pImp*/) { // the default implementation does nothing } diff --git a/code/BaseProcess.cpp b/code/BaseProcess.cpp index 167f4f6a5..da25a0be6 100644 --- a/code/BaseProcess.cpp +++ b/code/BaseProcess.cpp @@ -90,7 +90,7 @@ void BaseProcess::ExecuteOnScene( Importer* pImp) } // ------------------------------------------------------------------------------------------------ -void BaseProcess::SetupProperties(const Importer* pImp) +void BaseProcess::SetupProperties(const Importer* /*pImp*/) { // the default implementation does nothing } diff --git a/code/BlenderDNA.cpp b/code/BlenderDNA.cpp index eeb093b04..18c9574c9 100644 --- a/code/BlenderDNA.cpp +++ b/code/BlenderDNA.cpp @@ -288,7 +288,7 @@ boost::shared_ptr< ElemBase > DNA :: ConvertBlobToStructure( // ------------------------------------------------------------------------------------------------ DNA::FactoryPair DNA :: GetBlobToStructureConverter( const Structure& structure, - const FileDatabase& db + const FileDatabase& /*db*/ ) const { std::map::const_iterator it = converters.find(structure.name); diff --git a/code/BlenderDNA.h b/code/BlenderDNA.h index ce16d10f8..2eb071637 100644 --- a/code/BlenderDNA.h +++ b/code/BlenderDNA.h @@ -376,7 +376,7 @@ template <> struct Structure :: _defaultInitializer { template <> struct Structure :: _defaultInitializer { template - void operator ()(T& out,const char* = "") { + void operator ()(T& /*out*/,const char* = "") { // obviously, it is crucial that _DefaultInitializer is used // only from within a catch clause. throw; @@ -681,7 +681,7 @@ public: ObjectCache(const FileDatabase&) {} - template void get(const Structure&, vector&t, const Pointer&) {} + template void get(const Structure&, vector&, const Pointer&) {} template void set(const Structure&, const vector&, const Pointer&) {} }; @@ -701,9 +701,9 @@ public: FileDatabase() - : next_cache_idx() - , _cacheArrays(*this) + : _cacheArrays(*this) , _cache(*this) + , next_cache_idx() {} public: @@ -727,12 +727,12 @@ public: // arrays of objects are never cached because we can't easily // ensure their proper destruction. template - ObjectCache& cache(boost::shared_ptr& in) const { + ObjectCache& cache(boost::shared_ptr& /*in*/) const { return _cache; } template - ObjectCache& cache(vector& in) const { + ObjectCache& cache(vector& /*in*/) const { return _cacheArrays; } diff --git a/code/BlenderDNA.inl b/code/BlenderDNA.inl index bcfa7ed8d..474abc522 100644 --- a/code/BlenderDNA.inl +++ b/code/BlenderDNA.inl @@ -348,7 +348,7 @@ void Structure :: ResolvePointer(TOUT& out, const Pointer & ptrval, const Fil } //-------------------------------------------------------------------------------- -inline void Structure :: ResolvePointer( boost::shared_ptr< FileOffset >& out, const Pointer & ptrval, const FileDatabase& db, const Field& f) const +inline void Structure :: ResolvePointer( boost::shared_ptr< FileOffset >& out, const Pointer & ptrval, const FileDatabase& db, const Field& /*f*/) const { // Currently used exclusively by PackedFile::data to represent // a simple offset into the mapped BLEND file. @@ -402,7 +402,7 @@ void Structure :: ResolvePointer(vector< TOUT >& out, const Pointer & ptrval, template <> void Structure :: ResolvePointer(boost::shared_ptr& out, const Pointer & ptrval, const FileDatabase& db, - const Field& f + const Field& /*f*/ ) const { // Special case when the data type needs to be determined at runtime. diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp index 9ca76ad0a..440aee15c 100644 --- a/code/BlenderLoader.cpp +++ b/code/BlenderLoader.cpp @@ -127,7 +127,7 @@ const aiLoaderDesc& BlenderImporter::GetInfo () const // ------------------------------------------------------------------------------------------------ // Setup configuration properties for the loader -void BlenderImporter::SetupProperties(const Importer* pImp) +void BlenderImporter::SetupProperties(const Importer* /*pImp*/) { // nothing to be done for the moment } @@ -400,7 +400,7 @@ void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileD // ------------------------------------------------------------------------------------------------ void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, const MTex* tex, const Image* img, ConversionData& conv_data) { - mat; tex; conv_data; + (void)mat; (void)tex; (void)conv_data; aiString name; // check if the file contents are bundled with the BLEND file @@ -445,7 +445,7 @@ void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, con // ------------------------------------------------------------------------------------------------ void BlenderImporter::AddSentinelTexture(MaterialHelper* out, const Material* mat, const MTex* tex, ConversionData& conv_data) { - mat; tex; conv_data; + (void)mat; (void)tex; (void)conv_data; aiString name; name.length = sprintf(name.data, "Procedural,num=%i,type=%s",conv_data.sentinel_cnt++, @@ -600,7 +600,7 @@ void BlenderImporter::NotSupportedObjectType(const Object* obj, const char* type } // ------------------------------------------------------------------------------------------------ -void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh* mesh, +void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, const Mesh* mesh, ConversionData& conv_data, TempArray& temp ) { @@ -847,7 +847,7 @@ void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh } // ------------------------------------------------------------------------------------------------ -aiCamera* BlenderImporter::ConvertCamera(const Scene& in, const Object* obj, const Camera* mesh, ConversionData& conv_data) +aiCamera* BlenderImporter::ConvertCamera(const Scene& /*in*/, const Object* /*obj*/, const Camera* /*mesh*/, ConversionData& /*conv_data*/) { ScopeGuard out(new aiCamera()); @@ -855,7 +855,7 @@ aiCamera* BlenderImporter::ConvertCamera(const Scene& in, const Object* obj, con } // ------------------------------------------------------------------------------------------------ -aiLight* BlenderImporter::ConvertLight(const Scene& in, const Object* obj, const Lamp* mesh, ConversionData& conv_data) +aiLight* BlenderImporter::ConvertLight(const Scene& /*in*/, const Object* /*obj*/, const Lamp* /*mesh*/, ConversionData& /*conv_data*/) { ScopeGuard out(new aiLight()); diff --git a/code/BlenderModifier.cpp b/code/BlenderModifier.cpp index 54366b4c4..ba75d06b7 100644 --- a/code/BlenderModifier.cpp +++ b/code/BlenderModifier.cpp @@ -178,7 +178,7 @@ bool BlenderModifier_Mirror :: IsActive (const ModifierData& modin) // ------------------------------------------------------------------------------------------------ void BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data, const ElemBase& orig_modifier, - const Scene& in, + const Scene& /*in*/, const Object& orig_object ) { // hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers() @@ -271,7 +271,7 @@ bool BlenderModifier_Subdivision :: IsActive (const ModifierData& modin) // ------------------------------------------------------------------------------------------------ void BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data, const ElemBase& orig_modifier, - const Scene& in, + const Scene& /*in*/, const Object& orig_object ) { // hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers() diff --git a/code/BlenderModifier.h b/code/BlenderModifier.h index 390637188..258f7c8b2 100644 --- a/code/BlenderModifier.h +++ b/code/BlenderModifier.h @@ -64,7 +64,7 @@ public: // -------------------- /** Check if *this* modifier is active, given a ModifierData& block.*/ - virtual bool IsActive( const ModifierData& modin) { + virtual bool IsActive( const ModifierData& /*modin*/) { return false; } @@ -72,11 +72,11 @@ public: /** Apply the modifier to a given output node. The original data used * to construct the node is given as well. Not called unless IsActive() * was called and gave positive response. */ - virtual void DoIt(aiNode& out, - ConversionData& conv_data, + virtual void DoIt(aiNode& /*out*/, + ConversionData& /*conv_data*/, const ElemBase& orig_modifier, - const Scene& in, - const Object& orig_object + const Scene& /*in*/, + const Object& /*orig_object*/ ) { DefaultLogger::get()->warn((Formatter::format("This modifier is not supported, skipping: "),orig_modifier.dna_type)); return; diff --git a/code/BlobIOSystem.h b/code/BlobIOSystem.h index b1dac8e05..638ea3353 100644 --- a/code/BlobIOSystem.h +++ b/code/BlobIOSystem.h @@ -56,13 +56,13 @@ class BlobIOStream : public IOStream public: BlobIOStream(BlobIOSystem* creator, const std::string& file, size_t initial = 4096) - : file_size() - , cursor() - , buffer() - , creator(creator) - , file(file) + : buffer() , cur_size() + , file_size() + , cursor() , initial(initial) + , file(file) + , creator(creator) { } diff --git a/code/BoostWorkaround/boost/static_assert.hpp b/code/BoostWorkaround/boost/static_assert.hpp index f97971f80..718157622 100644 --- a/code/BoostWorkaround/boost/static_assert.hpp +++ b/code/BoostWorkaround/boost/static_assert.hpp @@ -14,7 +14,7 @@ namespace boost { #define BOOST_STATIC_ASSERT(eval) \ -{boost::detail::static_assertion_failure<(eval)> assert_dummy;assert_dummy;} +{boost::detail::static_assertion_failure<(eval)> assert_dummy;(void)assert_dummy;} #endif #endif // !! AI_BOOST_STATIC_ASSERT_INCLUDED diff --git a/code/ByteSwap.h b/code/ByteSwap.h index 7aab793cf..7c74ae3b6 100644 --- a/code/ByteSwap.h +++ b/code/ByteSwap.h @@ -273,8 +273,8 @@ struct Getter { template struct Getter { - void operator() (T* inout, bool le) { + void operator() (T* inout, bool /*le*/) { // static branch ByteSwapper1)> () (inout); } diff --git a/code/COBLoader.cpp b/code/COBLoader.cpp index d78c4f4b5..f73f1a199 100644 --- a/code/COBLoader.cpp +++ b/code/COBLoader.cpp @@ -108,7 +108,7 @@ void COBImporter::GetExtensionList(std::set& app) // ------------------------------------------------------------------------------------------------ // Setup configuration properties for the loader -void COBImporter::SetupProperties(const Importer* pImp) +void COBImporter::SetupProperties(const Importer* /*pImp*/) { // nothing to be done for the moment } @@ -505,7 +505,7 @@ void COBImporter::LogDebug_Ascii(const Formatter::format& message) { } // ------------------------------------------------------------------------------------------------ -void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& nfo) +void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& /*nfo*/) { for(;splitter;++splitter) { if (splitter.match_start("Name")) { @@ -639,7 +639,7 @@ void COBImporter::ReadUnit_Ascii(Scene& out, LineSplitter& splitter, const Chunk } // ------------------------------------------------------------------------------------------------ -void COBImporter::ReadChan_Ascii(Scene& out, LineSplitter& splitter, const ChunkInfo& nfo) +void COBImporter::ReadChan_Ascii(Scene& /*out*/, LineSplitter& splitter, const ChunkInfo& nfo) { if(nfo.version > 8) { return UnsupportedChunk_Ascii(splitter,nfo,"Chan"); @@ -850,7 +850,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk } // ------------------------------------------------------------------------------------------------ -void COBImporter::ReadBitM_Ascii(Scene& out, LineSplitter& splitter, const ChunkInfo& nfo) +void COBImporter::ReadBitM_Ascii(Scene& /*out*/, LineSplitter& splitter, const ChunkInfo& nfo) { if(nfo.version > 1) { return UnsupportedChunk_Ascii(splitter,nfo,"BitM"); @@ -886,7 +886,7 @@ void COBImporter::ReadString_Binary(std::string& out, StreamReaderLE& reader) } // ------------------------------------------------------------------------------------------------ -void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& nfo) +void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& /*nfo*/) { const unsigned int dupes = reader.GetI2(); ReadString_Binary(msh.name,reader); @@ -1077,7 +1077,7 @@ void COBImporter::ReadPolH_Binary(COB::Scene& out, StreamReaderLE& reader, const } // ------------------------------------------------------------------------------------------------ -void COBImporter::ReadBitM_Binary(COB::Scene& out, StreamReaderLE& reader, const ChunkInfo& nfo) +void COBImporter::ReadBitM_Binary(COB::Scene& /*out*/, StreamReaderLE& reader, const ChunkInfo& nfo) { if(nfo.version > 1) { return UnsupportedChunk_Binary(reader,nfo,"BitM"); diff --git a/code/CSMLoader.cpp b/code/CSMLoader.cpp index 3eb3502f4..40447f05c 100644 --- a/code/CSMLoader.cpp +++ b/code/CSMLoader.cpp @@ -90,7 +90,7 @@ void CSMImporter::GetExtensionList(std::set& extensions) // ------------------------------------------------------------------------------------------------ // Setup configuration properties for the loader -void CSMImporter::SetupProperties(const Importer* pImp) +void CSMImporter::SetupProperties(const Importer* /*pImp*/) { // nothing to be done for the moment } diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index 1f0ee7402..f7dc569dd 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -349,7 +349,7 @@ void ColladaExporter::WriteNode( const aiNode* pNode) // instance every geometry for( size_t a = 0; a < pNode->mNumMeshes; ++a ) { - const aiMesh* mesh = mScene->mMeshes[pNode->mMeshes[a]]; + // const aiMesh* mesh = mScene->mMeshes[pNode->mMeshes[a]]; mOutput << startstr << "" << endstr; PushTag(); diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 5059b54b6..04da81923 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -1180,7 +1180,7 @@ void ColladaLoader::AddTexture ( Assimp::MaterialHelper& mat, const ColladaParse // ------------------------------------------------------------------------------------------------ // Fills materials from the collada material definitions -void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* pScene) +void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pScene*/) { for (std::vector >::iterator it = newMats.begin(), end = newMats.end(); it != end; ++it) @@ -1272,7 +1272,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* pScene // ------------------------------------------------------------------------------------------------ // Constructs materials from the collada material definitions -void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* pScene) +void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* /*pScene*/) { newMats.reserve(pParser.mMaterialLibrary.size()); diff --git a/code/ComputeUVMappingProcess.cpp b/code/ComputeUVMappingProcess.cpp index 7ca37765d..f632ed8a9 100644 --- a/code/ComputeUVMappingProcess.cpp +++ b/code/ComputeUVMappingProcess.cpp @@ -380,7 +380,7 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D& } // ------------------------------------------------------------------------------------------------ -void ComputeUVMappingProcess::ComputeBoxMapping(aiMesh* mesh, aiVector3D* out) +void ComputeUVMappingProcess::ComputeBoxMapping(aiMesh* /*mesh*/, aiVector3D* /*out*/) { DefaultLogger::get()->error("Mapping type currently not implemented"); } diff --git a/code/DXFLoader.cpp b/code/DXFLoader.cpp index 4cdf54813..f63fd2427 100644 --- a/code/DXFLoader.cpp +++ b/code/DXFLoader.cpp @@ -98,7 +98,7 @@ DXFImporter::~DXFImporter() // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. -bool DXFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const +bool DXFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const { return SimpleExtensionCheck(pFile,"dxf"); } @@ -381,7 +381,7 @@ void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& bloc // ------------------------------------------------------------------------------------------------ -void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& output) +void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& /*output*/) { // generate an almost-white default material. Reason: // the default vertex color is GREY, so we are @@ -408,7 +408,7 @@ void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& output) // ------------------------------------------------------------------------------------------------ -void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& output) +void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& /*output*/) { // generate the output scene graph, which is just the root node with a single child for each layer. pScene->mRootNode = new aiNode(); @@ -441,7 +441,7 @@ void DXFImporter::SkipSection(DXF::LineReader& reader) // ------------------------------------------------------------------------------------------------ -void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& output) +void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& /*output*/) { for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++); } @@ -506,7 +506,7 @@ void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output) Parse3DFace(++reader, output); continue; } - ++reader; + ++reader; } } @@ -545,7 +545,7 @@ void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output) )); } -// ------------------------------------------------------------------------------------------------ + void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output) { output.blocks.back().insertions.push_back( DXF::InsertBlock() ); @@ -599,8 +599,6 @@ void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output) // ------------------------------------------------------------------------------------------------ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output) { - bool ret = false; - output.blocks.back().lines.push_back( boost::shared_ptr( new DXF::PolyLine() ) ); DXF::PolyLine& line = *output.blocks.back().lines.back(); @@ -685,13 +683,12 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output) line.indices.push_back(i*2); line.indices.push_back(i*2+1); line.counts.push_back(2); - } + } // closed polyline? if (line.flags & DXF_POLYLINE_FLAG_CLOSED) { line.indices.push_back(line.positions.size()-1); - line.indices.push_back(0); - + line.indices.push_back(0); line.counts.push_back(2); } } @@ -881,7 +878,7 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output) } // sanity checks to see if we got something meaningful - if (b[1] && !b[0] || !b[2] || !b[3]) { + if ((b[1] && !b[0]) || !b[2] || !b[3]) { DefaultLogger::get()->warn("DXF: unexpected vertex setup in 3DFACE/LINE/FACE entity; ignoring"); output.blocks.back().lines.pop_back(); return; diff --git a/code/DefaultProgressHandler.h b/code/DefaultProgressHandler.h index 7cb6dd468..e3b60930e 100644 --- a/code/DefaultProgressHandler.h +++ b/code/DefaultProgressHandler.h @@ -53,7 +53,7 @@ class ASSIMP_API DefaultProgressHandler : public ProgressHandler { - virtual bool Update(float percentage) { + virtual bool Update(float /*percentage*/) { return false; } diff --git a/code/IFCLoader.cpp b/code/IFCLoader.cpp index fe98511e9..d9f15cd9f 100644 --- a/code/IFCLoader.cpp +++ b/code/IFCLoader.cpp @@ -259,10 +259,18 @@ struct TempMesh aiVector3D vmin,vmax; ArrayBounds(&*base, cnt ,vmin,vmax); +<<<<<<< HEAD const float epsilon = (vmax-vmin).SquareLength() / 1e9f, dotepsilon = 1e-7; //// look for vertices that lie directly on the line between their predecessor and their //// successor and replace them with either of them. +======= + const float epsilon = (vmax-vmin).SquareLength() / 1e9f; + + //// look for vertices that lie directly on the line between their predecessor and their + //// successor and replace them with either of them. + //const float dotepsilon = 1e-7; +>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce //for(size_t i = 0; i < cnt; ++i) { // aiVector3D& v1 = *(base+i), &v0 = *(base+(i?i-1:cnt-1)), &v2 = *(base+(i+1)%cnt); // const aiVector3D& d0 = (v1-v0), &d1 = (v2-v1); @@ -669,7 +677,7 @@ void AssignMatrixAxes(aiMatrix4x4& out, const aiVector3D& x, const aiVector3D& y } // ------------------------------------------------------------------------------------------------ -void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement3D& in, ConversionData& conv) +void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement3D& in, ConversionData& /*conv*/) { aiVector3D loc; ConvertCartesianPoint(loc,in.Location); @@ -694,7 +702,7 @@ void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement3D& in, } // ------------------------------------------------------------------------------------------------ -void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement2D& in, ConversionData& conv) +void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement2D& in, ConversionData& /*conv*/) { aiVector3D loc; ConvertCartesianPoint(loc,in.Location); @@ -711,7 +719,7 @@ void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement2D& in, } // ------------------------------------------------------------------------------------------------ -void ConvertAxisPlacement(aiVector3D& axis, aiVector3D& pos, const IFC::IfcAxis1Placement& in, ConversionData& conv) +void ConvertAxisPlacement(aiVector3D& axis, aiVector3D& pos, const IFC::IfcAxis1Placement& in, ConversionData& /*conv*/) { ConvertCartesianPoint(pos,in.Location); if (in.Axis) { @@ -797,7 +805,7 @@ void ConvertTransformOperator(aiMatrix4x4& out, const IFC::IfcCartesianTransform } // ------------------------------------------------------------------------------------------------ -bool ProcessPolyloop(const IFC::IfcPolyLoop& loop, TempMesh& meshout, ConversionData& conv) +bool ProcessPolyloop(const IFC::IfcPolyLoop& loop, TempMesh& meshout, ConversionData& /*conv*/) { size_t cnt = 0; BOOST_FOREACH(const IFC::IfcCartesianPoint& c, loop.Polygon) { @@ -1022,7 +1030,7 @@ void MergePolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t mas // see if one of the polygons is a IfcFaceOuterBound (in which case `master_bounds` is its index). // sadly we can't rely on it, the docs say 'At most one of the bounds shall be of the type IfcFaceOuterBound' float area_outer_polygon = 1e-10f; - if (master_bounds != -1) { + if (master_bounds != (size_t)-1) { outer_polygon = begin + master_bounds; outer_polygon_start = std::accumulate(begin,outer_polygon,0); area_outer_polygon = normals[master_bounds].SquareLength(); @@ -1146,17 +1154,28 @@ next_loop: void ProcessConnectedFaceSet(const IFC::IfcConnectedFaceSet& fset, TempMesh& result, ConversionData& conv) { BOOST_FOREACH(const IFC::IfcFace& face, fset.CfsFaces) { +<<<<<<< HEAD size_t ob = -1, cnt = 0; +======= + // size_t ob = -1, cnt = 0; +>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce TempMesh meshout; BOOST_FOREACH(const IFC::IfcFaceBound& bound, face.Bounds) { // XXX implement proper merging for polygonal loops if(const IFC::IfcPolyLoop* const polyloop = bound.Bound->ToPtr()) { if(ProcessPolyloop(*polyloop, meshout,conv)) { +<<<<<<< HEAD if(bound.ToPtr()) { ob = cnt; } ++cnt; +======= + // if(bound.ToPtr()) { + // ob = cnt; + // } + // ++cnt; +>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce } } else { @@ -1178,7 +1197,7 @@ void ProcessConnectedFaceSet(const IFC::IfcConnectedFaceSet& fset, TempMesh& res } // ------------------------------------------------------------------------------------------------ -void ProcessPolyLine(const IFC::IfcPolyline& def, TempMesh& meshout, ConversionData& conv) +void ProcessPolyLine(const IFC::IfcPolyline& def, TempMesh& meshout, ConversionData& /*conv*/) { // this won't produce a valid mesh, it just spits out a list of vertices aiVector3D t; @@ -1385,13 +1404,13 @@ bool TryAddOpenings(const std::vector& openings,const std::vector& va = t.profileMesh->verts; if(va.size() <= 2) { continue; } - const float dd = t.extrusionDir*nor; + // const float dd = t.extrusionDir*nor; IFCImporter::LogDebug("apply an IfcOpeningElement linked via IfcRelVoidsElement to this polygon"); got_openings = true; @@ -1635,7 +1654,11 @@ void InsertWindowContours(const std::vector< BoundingBox >& bbs,const std::vecto } if (hit) { +<<<<<<< HEAD if (last_hit != -1) { +======= + if (last_hit != (size_t)-1) { +>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce const size_t old = curmesh.verts.size(); size_t cnt = last_hit > n ? size-(last_hit-n) : n-last_hit; for(size_t a = last_hit, e = 0; e <= cnt; a=(a+1)%size, ++e) { @@ -1683,7 +1706,7 @@ bool TryAddOpenings_Quadrulate(const std::vector& openings,const st const aiVector3D any_point = out[s-4]; const aiVector3D nor = ((out[s-3]-any_point)^(out[s-2]-any_point)).Normalize(); - const aiVector3D diag = vmax-vmin, diagn = aiVector3D(diag).Normalize(); + const aiVector3D diag = vmax-vmin; const float ax = fabs(nor.x); const float ay = fabs(nor.y); const float az = fabs(nor.z); @@ -1727,7 +1750,11 @@ bool TryAddOpenings_Quadrulate(const std::vector& openings,const st continue; } +<<<<<<< HEAD const aiVector3D diff = t.extrusionDir; +======= + // const aiVector3D diff = t.extrusionDir; +>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce const std::vector& va = t.profileMesh->verts; if(va.size() <= 2) { continue; @@ -1928,7 +1955,7 @@ void ProcessExtrudedAreaSolid(const IFC::IfcExtrudedAreaSolid& solid, TempMesh& } } - if(conv.apply_openings && (sides_with_openings != 2 && sides_with_openings || sides_with_v_openings != 2 && sides_with_v_openings)) { + if(conv.apply_openings && ((sides_with_openings != 2 && sides_with_openings) || (sides_with_v_openings != 2 && sides_with_v_openings))) { IFCImporter::LogWarn("failed to resolve all openings, presumably their topology is not supported by Assimp"); } @@ -2142,7 +2169,7 @@ void FillMaterial(MaterialHelper* mat,const IFC::IfcSurfaceStyle* surf,Conversio mat->AddProperty(&col,1, AI_MATKEY_COLOR_REFLECTIVE); } - const int shading = (ren->SpecularHighlight && ren->SpecularColour)?ConvertShadingMode(ren->ReflectanceMethod):aiShadingMode_Gouraud; + const int shading = (ren->SpecularHighlight && ren->SpecularColour)?ConvertShadingMode(ren->ReflectanceMethod):static_cast(aiShadingMode_Gouraud); mat->AddProperty(&shading,1, AI_MATKEY_SHADING_MODEL); if (ren->SpecularHighlight) { @@ -2263,7 +2290,7 @@ bool ProcessGeometricItem(const IFC::IfcGeometricRepresentationItem& geo, std::v else if(const IFC::IfcBooleanResult* boolean = geo.ToPtr()) { ProcessBoolean(*boolean,meshtmp,conv); } - else if(const IFC::IfcBoundingBox* bb = geo.ToPtr()) { + else if(geo.ToPtr()) { // silently skip over bounding boxes return false; } @@ -2286,7 +2313,7 @@ bool ProcessGeometricItem(const IFC::IfcGeometricRepresentationItem& geo, std::v } // ------------------------------------------------------------------------------------------------ -void AssignAddedMeshes(std::vector& mesh_indices,aiNode* nd,ConversionData& conv) +void AssignAddedMeshes(std::vector& mesh_indices,aiNode* nd,ConversionData& /*conv*/) { if (!mesh_indices.empty()) { diff --git a/code/IFCReaderGen.cpp b/code/IFCReaderGen.cpp index 14f0ef898..7cc2e6389 100644 --- a/code/IFCReaderGen.cpp +++ b/code/IFCReaderGen.cpp @@ -1045,7 +1045,7 @@ void IFC::GetSchema(EXPRESS::ConversionSchema& out) namespace STEP { // ----------------------------------------------------------------------------------------------------------- -template <> size_t GenericFill(const STEP::DB& db, const LIST& params, NotImplemented* in) +template <> size_t GenericFill(const STEP::DB& /*db*/, const LIST& /*params*/, NotImplemented* /*in*/) { return 0; } @@ -1166,7 +1166,7 @@ template <> size_t GenericFill(const DB& db, const LIST& params, IfcGri return base; } // ----------------------------------------------------------------------------------------------------------- -template <> size_t GenericFill(const DB& db, const LIST& params, IfcRepresentationItem* in) +template <> size_t GenericFill(const DB& /*db*/, const LIST& params, IfcRepresentationItem* /*in*/) { size_t base = 0; if (params.GetSize() < 0) { throw STEP::TypeError("expected 0 arguments to IfcRepresentationItem"); } return base; @@ -1867,8 +1867,8 @@ template <> size_t GenericFill(const DB& db, const LIST& params, IfcC // this data structure is not used yet, so there is no code generated to fill its members return base; } -// ----------------------------------------------------------------------------------------------------------- -template <> size_t GenericFill(const DB& db, const LIST& params, IfcObjectPlacement* in) +template <> size_t GenericFill(const DB& /*db*/, const LIST& params, IfcObjectPlacement* /*in*/) +>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce { size_t base = 0; if (params.GetSize() < 0) { throw STEP::TypeError("expected 0 arguments to IfcObjectPlacement"); } return base; diff --git a/code/JoinVerticesProcess.cpp b/code/JoinVerticesProcess.cpp index ff2abd728..1d1609280 100644 --- a/code/JoinVerticesProcess.cpp +++ b/code/JoinVerticesProcess.cpp @@ -138,7 +138,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) // A little helper to find locally close vertices faster. // Try to reuse the lookup table from the last step. const static float epsilon = 1e-5f; - float posEpsilonSqr; + // float posEpsilonSqr; SpatialSort* vertexFinder = NULL; SpatialSort _vertexFinder; @@ -149,14 +149,14 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) if (avf) { SpatPair& blubb = (*avf)[meshIndex]; vertexFinder = &blubb.first; - posEpsilonSqr = blubb.second; + // posEpsilonSqr = blubb.second; } } if (!vertexFinder) { // bad, need to compute it. _vertexFinder.Fill(pMesh->mVertices, pMesh->mNumVertices, sizeof( aiVector3D)); vertexFinder = &_vertexFinder; - posEpsilonSqr = ComputePositionEpsilon(pMesh); + // posEpsilonSqr = ComputePositionEpsilon(pMesh); } // Squared because we check against squared length of the vector difference diff --git a/code/LWOAnimation.cpp b/code/LWOAnimation.cpp index f7a7d3f57..9e2079cc0 100644 --- a/code/LWOAnimation.cpp +++ b/code/LWOAnimation.cpp @@ -535,9 +535,9 @@ void AnimResolver::ExtractAnimChannel(aiNodeAnim** out, unsigned int flags /*= 0 } // We won't spawn an animation channel if we don't have at least one envelope with more than one keyframe defined. - const bool trans = (trans_x && trans_x->keys.size() > 1 || trans_y && trans_y->keys.size() > 1 || trans_z && trans_z->keys.size() > 1); - const bool rotat = (rotat_x && rotat_x->keys.size() > 1 || rotat_y && rotat_y->keys.size() > 1 || rotat_z && rotat_z->keys.size() > 1); - const bool scale = (scale_x && scale_x->keys.size() > 1 || scale_y && scale_y->keys.size() > 1 || scale_z && scale_z->keys.size() > 1); + const bool trans = ((trans_x && trans_x->keys.size() > 1) || (trans_y && trans_y->keys.size() > 1) || (trans_z && trans_z->keys.size() > 1)); + const bool rotat = ((rotat_x && rotat_x->keys.size() > 1) || (rotat_y && rotat_y->keys.size() > 1) || (rotat_z && rotat_z->keys.size() > 1)); + const bool scale = ((scale_x && scale_x->keys.size() > 1) || (scale_y && scale_y->keys.size() > 1) || (scale_z && scale_z->keys.size() > 1)); if (!trans && !rotat && !scale) return; diff --git a/code/LWOFileData.h b/code/LWOFileData.h index 682835164..755085131 100644 --- a/code/LWOFileData.h +++ b/code/LWOFileData.h @@ -276,7 +276,7 @@ struct Face : public aiFace {} //! Copy construction - Face(const Face& f) { + Face(const Face& f) : aiFace() { *this = f; } diff --git a/code/LWOMaterial.cpp b/code/LWOMaterial.cpp index 5fc2bd7e0..441f1530b 100644 --- a/code/LWOMaterial.cpp +++ b/code/LWOMaterial.cpp @@ -376,7 +376,7 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,MaterialHelper* pcMat // ------------------------------------------------------------------------------------------------ char LWOImporter::FindUVChannels(LWO::TextureList& list, - LWO::Layer& layer,LWO::UVChannel& uv, unsigned int next) + LWO::Layer& /*layer*/,LWO::UVChannel& uv, unsigned int next) { char ret = 0; for (TextureList::iterator it = list.begin(), end = list.end();it != end;++it) { @@ -562,7 +562,7 @@ void LWOImporter::LoadLWO2ImageMap(unsigned int size, LWO::Texture& tex ) } // ------------------------------------------------------------------------------------------------ -void LWOImporter::LoadLWO2Procedural(unsigned int size, LWO::Texture& tex ) +void LWOImporter::LoadLWO2Procedural(unsigned int /*size*/, LWO::Texture& tex ) { // --- not supported at the moment DefaultLogger::get()->error("LWO2: Found procedural texture, this is not supported"); @@ -570,7 +570,7 @@ void LWOImporter::LoadLWO2Procedural(unsigned int size, LWO::Texture& tex ) } // ------------------------------------------------------------------------------------------------ -void LWOImporter::LoadLWO2Gradient(unsigned int size, LWO::Texture& tex ) +void LWOImporter::LoadLWO2Gradient(unsigned int /*size*/, LWO::Texture& tex ) { // --- not supported at the moment DefaultLogger::get()->error("LWO2: Found gradient texture, this is not supported"); @@ -675,7 +675,7 @@ void LWOImporter::LoadLWO2TextureBlock(LE_NCONST IFF::SubChunkHeader* head, unsi } // ------------------------------------------------------------------------------------------------ -void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* head, unsigned int size ) +void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* /*head*/, unsigned int size ) { LE_NCONST uint8_t* const end = mFileBuffer + size; diff --git a/code/LWSLoader.cpp b/code/LWSLoader.cpp index f05aa5223..bc5d9e10e 100644 --- a/code/LWSLoader.cpp +++ b/code/LWSLoader.cpp @@ -241,7 +241,7 @@ void LWSImporter::ReadEnvelope_Old( std::list< LWS::Element >::const_iterator& it, const std::list< LWS::Element >::const_iterator& end, LWS::NodeDesc& nodes, - unsigned int version) + unsigned int /*version*/) { unsigned int num,sub_num; if (++it == end)goto unexpected_end; diff --git a/code/LineSplitter.h b/code/LineSplitter.h index 4ec8b8957..9540ad099 100644 --- a/code/LineSplitter.h +++ b/code/LineSplitter.h @@ -126,7 +126,7 @@ public: } if (trim) { - while (stream.GetRemainingSize() && ((s = stream.GetI1()) == ' ') || s == '\t'); + while (stream.GetRemainingSize() && ((s = stream.GetI1()) == ' ' || s == '\t')); if (stream.GetRemainingSize()) { stream.IncPtr(-1); } diff --git a/code/MD5Loader.cpp b/code/MD5Loader.cpp index 7e7ba2c3b..cdd1ab483 100644 --- a/code/MD5Loader.cpp +++ b/code/MD5Loader.cpp @@ -62,8 +62,8 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer MD5Importer::MD5Importer() -: configNoAutoLoad (false) -, mBuffer() +: mBuffer() +, configNoAutoLoad (false) {} // ------------------------------------------------------------------------------------------------ @@ -367,7 +367,6 @@ void MD5Importer::LoadMD5MeshFile () if (pScene->mRootNode->mChildren[1]->mNumChildren) /* start at the right hierarchy level */ SkeletonMeshBuilder skeleton_maker(pScene,pScene->mRootNode->mChildren[1]->mChildren[0]); #else - std::vector::const_iterator end = meshParser.mMeshes.end(); // FIX: MD5 files exported from Blender can have empty meshes for (std::vector::const_iterator it = meshParser.mMeshes.begin(),end = meshParser.mMeshes.end(); it != end;++it) { diff --git a/code/MS3DLoader.cpp b/code/MS3DLoader.cpp index ca5236204..370f0fb6c 100644 --- a/code/MS3DLoader.cpp +++ b/code/MS3DLoader.cpp @@ -364,6 +364,7 @@ void MS3DImporter::InternReadFile( const std::string& pFile, } const std::string& s = std::string(reinterpret_cast(stream.GetPtr()),len); + DefaultLogger::get()->debug("MS3D: Model comment: " + s); } if(stream.GetRemainingSize() > 4 && inrange((stream >> subversion,subversion),1u,3u)) { diff --git a/code/MemoryIOWrapper.h b/code/MemoryIOWrapper.h index 79b21a12b..e3b2b2d0a 100644 --- a/code/MemoryIOWrapper.h +++ b/code/MemoryIOWrapper.h @@ -74,7 +74,7 @@ public: // ------------------------------------------------------------------- // Write to stream - size_t Write(const void* pvBuffer, size_t pSize,size_t pCount) { + size_t Write(const void* /*pvBuffer*/, size_t /*pSize*/,size_t /*pCount*/) { ai_assert(false); // won't be needed return 0; } @@ -154,7 +154,7 @@ public: // ------------------------------------------------------------------- /** Open a new file with a given path. */ - IOStream* Open( const char* pFile, const char* pMode = "rb") { + IOStream* Open( const char* pFile, const char* /*pMode*/ = "rb") { if (strncmp(pFile,AI_MEMORYIO_MAGIC_FILENAME,AI_MEMORYIO_MAGIC_FILENAME_LENGTH)) { return NULL; } @@ -163,12 +163,12 @@ public: // ------------------------------------------------------------------- /** Closes the given file and releases all resources associated with it. */ - void Close( IOStream* pFile) { + void Close( IOStream* /*pFile*/) { } // ------------------------------------------------------------------- /** Compare two paths */ - bool ComparePaths (const char* one, const char* second) const { + bool ComparePaths (const char* /*one*/, const char* /*second*/) const { return false; } diff --git a/code/NDOLoader.cpp b/code/NDOLoader.cpp index 3c2020150..5711517a6 100644 --- a/code/NDOLoader.cpp +++ b/code/NDOLoader.cpp @@ -86,7 +86,7 @@ void NDOImporter::GetExtensionList(std::set& extensions) // ------------------------------------------------------------------------------------------------ // Setup configuration properties for the loader -void NDOImporter::SetupProperties(const Importer* pImp) +void NDOImporter::SetupProperties(const Importer* /*pImp*/) { // nothing to be done for the moment } diff --git a/code/NFFLoader.cpp b/code/NFFLoader.cpp index 16d715085..e978069eb 100644 --- a/code/NFFLoader.cpp +++ b/code/NFFLoader.cpp @@ -65,7 +65,7 @@ NFFImporter::~NFFImporter() // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. -bool NFFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const +bool NFFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const { return SimpleExtensionCheck(pFile,"nff","enff"); } diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index 864ed4fff..a165c94eb 100644 --- a/code/ObjFileImporter.cpp +++ b/code/ObjFileImporter.cpp @@ -175,7 +175,7 @@ void ObjFileImporter::CreateDataFromImport(const ObjFile::Model* pModel, aiScene // ------------------------------------------------------------------------------------------------ // Creates all nodes of the model aiNode *ObjFileImporter::createNodes(const ObjFile::Model* pModel, const ObjFile::Object* pObject, - unsigned int uiMeshIndex, + unsigned int /*uiMeshIndex*/, aiNode *pParent, aiScene* pScene, std::vector &MeshArray ) { @@ -499,6 +499,7 @@ void ObjFileImporter::appendChildToParentNode(aiNode *pParent, aiNode *pChild) // Assign parent to child pChild->mParent = pParent; size_t sNumChildren = 0; + (void)sNumChildren; // remove warning on release build // If already children was assigned to the parent node, store them in a std::vector temp; diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp index 8dfa9b9e7..c968a1c0d 100644 --- a/code/ObjFileParser.cpp +++ b/code/ObjFileParser.cpp @@ -643,7 +643,7 @@ bool ObjFileParser::needsNewMesh( const std::string &rMaterialName ) bool newMat = false; int matIdx = getMaterialIndex( rMaterialName ); int curMatIdx = m_pModel->m_pCurrentMesh->m_uiMaterialIndex; - if ( curMatIdx != ObjFile::Mesh::NoMaterial || curMatIdx != matIdx ) + if ( curMatIdx != int(ObjFile::Mesh::NoMaterial) || curMatIdx != matIdx ) { // New material -> only one material per mesh, so we need to create a new // material diff --git a/code/OgreImporter.cpp b/code/OgreImporter.cpp index 9986d7028..1898b3290 100644 --- a/code/OgreImporter.cpp +++ b/code/OgreImporter.cpp @@ -408,6 +408,7 @@ void OgreImporter::ReadSubMesh(SubMesh &theSubMesh, XmlReader *Reader) aiMesh* OgreImporter::CreateAssimpSubMesh(const SubMesh& theSubMesh, const vector& Bones) const { const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene + (void)m_CurrentScene; aiMesh* NewAiMesh=new aiMesh(); @@ -500,6 +501,7 @@ aiMesh* OgreImporter::CreateAssimpSubMesh(const SubMesh& theSubMesh, const vecto void OgreImporter::LoadSkeleton(std::string FileName, vector &Bones, vector &Animations) const { const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene + (void)m_CurrentScene; //most likely the skeleton file will only end with .skeleton @@ -705,7 +707,7 @@ void OgreImporter::LoadSkeleton(std::string FileName, vector &Bones, vecto } -void OgreImporter::CreateAssimpSkeleton(const std::vector &Bones, const std::vector &Animations) +void OgreImporter::CreateAssimpSkeleton(const std::vector &Bones, const std::vector &/*Animations*/) { if(!m_CurrentScene->mRootNode) throw DeadlyImportError("No root node exists!!"); @@ -818,6 +820,7 @@ void OgreImporter::PutAnimationsInScene(const std::vector &Bones, const st aiNode* OgreImporter::CreateAiNodeFromBone(int BoneId, const std::vector &Bones, aiNode* ParentNode) const { const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene + (void)m_CurrentScene; //----Create the node for this bone and set its values----- aiNode* NewNode=new aiNode(Bones[BoneId].Name); diff --git a/code/OgreImporterMaterial.cpp b/code/OgreImporterMaterial.cpp index 93a03e301..ed85e3856 100644 --- a/code/OgreImporterMaterial.cpp +++ b/code/OgreImporterMaterial.cpp @@ -69,6 +69,7 @@ namespace Ogre aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const { const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene + (void)m_CurrentScene; MaterialHelper *NewMaterial=new MaterialHelper(); diff --git a/code/ProcessHelper.cpp b/code/ProcessHelper.cpp index 640ea4c58..7f773b3d5 100644 --- a/code/ProcessHelper.cpp +++ b/code/ProcessHelper.cpp @@ -234,6 +234,8 @@ const char* TextureTypeToString(aiTextureType in) return "Reflection"; case aiTextureType_UNKNOWN: return "Unknown"; + default: + break; } ai_assert(false); @@ -257,6 +259,8 @@ const char* MappingTypeToString(aiTextureMapping in) return "Plane"; case aiTextureMapping_OTHER: return "Other"; + default: + break; } ai_assert(false); @@ -401,6 +405,7 @@ aiMesh* MakeSubmesh(const aiMesh *pMesh, const std::vector &subMes } ai_assert(nbParanoia==oMesh->mNumBones); + (void)nbParanoia; // remove compiler warning on release build } } diff --git a/code/ProcessHelper.h b/code/ProcessHelper.h index b08730d44..b0be855ed 100644 --- a/code/ProcessHelper.h +++ b/code/ProcessHelper.h @@ -344,7 +344,7 @@ class DestroySpatialSortProcess : public BaseProcess aiProcess_GenNormals | aiProcess_JoinIdenticalVertices)); } - void Execute( aiScene* pScene) + void Execute( aiScene* /*pScene*/) { shared->RemoveProperty(AI_SPP_SPATIAL_SORT); } diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp index 9f657036a..c6ecfd797 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -158,7 +158,7 @@ Q3BSPFileImporter::~Q3BSPFileImporter() // ------------------------------------------------------------------------------------------------ // Returns true, if the loader can read this. -bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* pIOHandler, bool checkSig ) const +bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* /*pIOHandler*/, bool checkSig ) const { if(!checkSig) { return SimpleExtensionCheck( rFile, Q3BSPExtension .c_str() ); @@ -176,7 +176,7 @@ void Q3BSPFileImporter::GetExtensionList( std::set& extensions ) // ------------------------------------------------------------------------------------------------ // Import method. -void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* pScene, IOSystem* pIOHandler) +void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* pScene, IOSystem* /*pIOHandler*/) { Q3BSPZipArchive Archive( rFile ); if ( !Archive.isOpen() ) @@ -469,7 +469,6 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen } pScene->mMaterials = new aiMaterial*[ m_MaterialLookupMap.size() ]; - size_t texIdx( 0 ); aiString aiMatName; int textureId( -1 ), lightmapId( -1 ); for ( FaceMapIt it = m_MaterialLookupMap.begin(); it != m_MaterialLookupMap.end(); @@ -623,7 +622,7 @@ aiFace *Q3BSPFileImporter::getNextFace( aiMesh *pMesh, unsigned int &rFaceIdx ) // ------------------------------------------------------------------------------------------------ // Imports a texture file. bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pModel, - Q3BSP::Q3BSPZipArchive *pArchive, aiScene* pScene, + Q3BSP::Q3BSPZipArchive *pArchive, aiScene* /*pScene*/, Assimp::MaterialHelper *pMatHelper, int textureId ) { std::vector supportedExtensions; @@ -656,6 +655,7 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode pTexture->mWidth = texSize; unsigned char *pData = new unsigned char[ pTexture->mWidth ]; size_t readSize = pTextureStream->Read( pData, sizeof( unsigned char ), pTexture->mWidth ); + (void)readSize; ai_assert( readSize == pTexture->mWidth ); pTexture->pcData = reinterpret_cast( pData ); pTexture->achFormatHint[ 0 ] = ext[ 0 ]; diff --git a/code/Q3BSPZipArchive.cpp b/code/Q3BSPZipArchive.cpp index 4a2bb1b8a..e209da4d9 100644 --- a/code/Q3BSPZipArchive.cpp +++ b/code/Q3BSPZipArchive.cpp @@ -113,7 +113,7 @@ char Q3BSPZipArchive::getOsSeparator() const // ------------------------------------------------------------------------------------------------ // Opens a file, which is part of the archive. -IOStream *Q3BSPZipArchive::Open( const char* pFile, const char* pMode ) +IOStream *Q3BSPZipArchive::Open( const char* pFile, const char* /*pMode*/ ) { ai_assert( NULL != pFile ); diff --git a/code/Q3BSPZipArchive.h b/code/Q3BSPZipArchive.h index 6c079cf23..6594b9260 100644 --- a/code/Q3BSPZipArchive.h +++ b/code/Q3BSPZipArchive.h @@ -93,18 +93,19 @@ public: // you need to mark the last character with '\0', so add // another character unzOpenCurrentFile( m_zipFile ); - bytes_read = unzReadCurrentFile( m_zipFile, pvBuffer, fileInfo.uncompressed_size); - if ( bytes_read < 0 || bytes_read != static_cast( fileInfo.uncompressed_size ) ) + const int ret = unzReadCurrentFile( m_zipFile, pvBuffer, fileInfo.uncompressed_size); + size_t filesize = fileInfo.uncompressed_size; + if ( ret < 0 || size_t(ret) != filesize ) { return 0; } - size_t filesize = fileInfo.uncompressed_size; + bytes_read = ret; unzCloseCurrentFile( m_zipFile ); } return bytes_read; } - size_t Write(const void* pvBuffer, size_t pSize, size_t pCount) + size_t Write(const void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/) { return 0; } @@ -122,7 +123,7 @@ public: return 0; } - aiReturn Seek(size_t pOffset, aiOrigin pOrigin) + aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/) { return aiReturn_FAILURE; } diff --git a/code/RawLoader.cpp b/code/RawLoader.cpp index 1955481a6..0b48286b0 100644 --- a/code/RawLoader.cpp +++ b/code/RawLoader.cpp @@ -65,7 +65,7 @@ RAWImporter::~RAWImporter() // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. -bool RAWImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const +bool RAWImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const { return SimpleExtensionCheck(pFile,"raw"); } diff --git a/code/SMDLoader.cpp b/code/SMDLoader.cpp index 5c6622176..7cc2e6a0c 100644 --- a/code/SMDLoader.cpp +++ b/code/SMDLoader.cpp @@ -65,7 +65,7 @@ SMDImporter::~SMDImporter() // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. -bool SMDImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool) const +bool SMDImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool) const { // fixme: auto format detection return SimpleExtensionCheck(pFile,"smd","vta"); @@ -200,6 +200,7 @@ void SMDImporter::LogWarning(const char* msg) { char szTemp[1024]; ai_assert(strlen(msg) < 1000); + sprintf(szTemp,"Line %i: %s",iLineNumber,msg); DefaultLogger::get()->warn(szTemp); } diff --git a/code/STEPFile.h b/code/STEPFile.h index 7b0c768c2..e678dc4cb 100644 --- a/code/STEPFile.h +++ b/code/STEPFile.h @@ -507,6 +507,7 @@ namespace STEP { // GenericFill is undefined so we need to have a specialization const size_t num_args = GenericFill(db,params,&*impl); + (void)num_args; // the following check is commented because it will always trigger if // parts of the entities are generated with dummy wrapper code. @@ -731,7 +732,7 @@ namespace STEP { // ------------------------------------------------------------------------------ template struct InternGenericConvert { - void operator()(T& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) { + void operator()(T& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& /*db*/) { try{ out = dynamic_cast< const typename PickBaseType::Type& > ( *in ); } @@ -743,7 +744,7 @@ namespace STEP { template <> struct InternGenericConvert< boost::shared_ptr< const EXPRESS::DataType > > { - void operator()(boost::shared_ptr< const EXPRESS::DataType >& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) { + void operator()(boost::shared_ptr< const EXPRESS::DataType >& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& /*db*/) { out = in; } }; diff --git a/code/STEPFileReader.cpp b/code/STEPFileReader.cpp index e1128b38f..48dc60990 100644 --- a/code/STEPFileReader.cpp +++ b/code/STEPFileReader.cpp @@ -407,12 +407,12 @@ boost::shared_ptr EXPRESS::LIST::Parse(const char*& inout,u // ------------------------------------------------------------------------------------------------ -STEP::LazyObject::LazyObject(DB& db, uint64_t id,uint64_t line, const char* const type,const char* args) - : db(db) - , id(id) +STEP::LazyObject::LazyObject(DB& db, uint64_t id,uint64_t /*line*/, const char* const type,const char* args) + : id(id) , type(type) - , obj() + , db(db) , args(args) + , obj() { // find any external references and store them in the database. // this helps us emulate STEPs INVERSE fields. diff --git a/code/SceneCombiner.cpp b/code/SceneCombiner.cpp index b6baada8e..90624a847 100644 --- a/code/SceneCombiner.cpp +++ b/code/SceneCombiner.cpp @@ -747,7 +747,7 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector::const_iterator // ------------------------------------------------------------------------------------------------ // Merge a list of meshes -void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int flags, +void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/, std::vector::const_iterator begin, std::vector::const_iterator end) { diff --git a/code/TerragenLoader.cpp b/code/TerragenLoader.cpp index 2a646ad6a..b2b75e1b0 100644 --- a/code/TerragenLoader.cpp +++ b/code/TerragenLoader.cpp @@ -121,6 +121,7 @@ void TerragenImporter::InternReadFile( const std::string& pFile, unsigned int x = 0,y = 0,mode = 0; float rad = 6370.f; + (void)rad; aiNode* root = pScene->mRootNode = new aiNode(); diff --git a/code/UnrealLoader.cpp b/code/UnrealLoader.cpp index b53c6beb5..f69f74206 100644 --- a/code/UnrealLoader.cpp +++ b/code/UnrealLoader.cpp @@ -72,7 +72,7 @@ UnrealImporter::~UnrealImporter() // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. -bool UnrealImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const +bool UnrealImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const { return SimpleExtensionCheck(pFile,"3d","uc"); } diff --git a/code/XFileParser.cpp b/code/XFileParser.cpp index 8c340283f..6640d0b43 100644 --- a/code/XFileParser.cpp +++ b/code/XFileParser.cpp @@ -1060,7 +1060,7 @@ std::string XFileParser::GetNextToken() // name token if( End - P < 4) return s; len = ReadBinDWord(); - if( End - P < len) return s; + if( End - P < int(len)) return s; s = std::string(P, len); P += len; return s; @@ -1068,7 +1068,7 @@ std::string XFileParser::GetNextToken() // string token if( End - P < 4) return s; len = ReadBinDWord(); - if( End - P < len) return s; + if( End - P < int(len)) return s; s = std::string(P, len); P += (len + 2); return s; diff --git a/contrib/unzip/crypt.h b/contrib/unzip/crypt.h index f14a628b4..5d3d8aeb4 100644 --- a/contrib/unzip/crypt.h +++ b/contrib/unzip/crypt.h @@ -34,6 +34,7 @@ */ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) { + (void)pcrc_32_tab; unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem * with any known compiler so far, though */ diff --git a/scripts/IFCImporter/CppGenerator.py b/scripts/IFCImporter/CppGenerator.py index cfbab8d8c..87d9f4e80 100644 --- a/scripts/IFCImporter/CppGenerator.py +++ b/scripts/IFCImporter/CppGenerator.py @@ -168,7 +168,9 @@ def gen_converter(entity,schema): if entity.name in schema.blacklist_partial: return code+template_converter_ommitted+template_converter_epilogue; - code +=template_converter_check_argcnt.format(max_arg=max_arg,name=entity.name) + if max_arg > 0: + code +=template_converter_check_argcnt.format(max_arg=max_arg,name=entity.name) + for field in entity.members: code += template_converter_code_per_field.format(fieldname=field.name, handle_unset=handle_unset_args(field,entity,schema,arg_idx-arg_idx_ofs), diff --git a/tools/assimp_cmd/CompareDump.cpp b/tools/assimp_cmd/CompareDump.cpp index 9c997ca5f..0a65e3240 100644 --- a/tools/assimp_cmd/CompareDump.cpp +++ b/tools/assimp_cmd/CompareDump.cpp @@ -605,6 +605,9 @@ void CompareOnTheFlyMaterialProperty(comparer_context& comp) { case aiPTI_Buffer: comp.cmp(length,"mData"); break; + + default: + break; }; } @@ -759,6 +762,7 @@ void CompareOnTheFlyTexture(comparer_context& comp) { const uint32_t w = comp.cmp("mWidth"); const uint32_t h = comp.cmp("mHeight"); + (void)w; (void)h; comp.cmp("achFormatHint[0]"); comp.cmp("achFormatHint[1]"); comp.cmp("achFormatHint[2]"); @@ -842,7 +846,7 @@ void CheckHeader(comparer_context& comp) int Assimp_CompareDump (const char* const* params, unsigned int num) { // --help - if (num == 1 && !strcmp( params[0], "-h") || !strcmp( params[0], "--help") || !strcmp( params[0], "-?") ) { + if ((num == 1 && !strcmp( params[0], "-h")) || !strcmp( params[0], "--help") || !strcmp( params[0], "-?") ) { printf("%s",AICMD_MSG_CMPDUMP_HELP); return 0; } diff --git a/tools/assimp_cmd/WriteDumb.cpp b/tools/assimp_cmd/WriteDumb.cpp index 68d98489b..95a9333a6 100644 --- a/tools/assimp_cmd/WriteDumb.cpp +++ b/tools/assimp_cmd/WriteDumb.cpp @@ -414,7 +414,7 @@ uint32_t WriteBinaryMesh(const aiMesh* mesh) // using Assimp's standard hashing function. if (shortened) { unsigned int processed = 0; - for (unsigned int job;job = std::min(mesh->mNumFaces-processed,512u);processed += job) { + for (unsigned int job;(job = std::min(mesh->mNumFaces-processed,512u));processed += job) { uint32_t hash = 0; for (unsigned int a = 0; a < job;++a) { @@ -799,7 +799,9 @@ const char* TextureTypeToString(aiTextureType in) case aiTextureType_REFLECTION: return "Reflection"; case aiTextureType_UNKNOWN: - return "Unknown"; + return "Unknown"; + default: + break; } ai_assert(false); return "BUG"; @@ -937,7 +939,7 @@ void WriteDump(const aiScene* scene, FILE* out, const char* src, const char* cmd else if (!shortened){ fprintf(out,"\t\t \n",tex->mWidth*tex->mHeight*4); - const unsigned int width = (unsigned int)log10((double)std::max(tex->mHeight,tex->mWidth))+1; + // const unsigned int width = (unsigned int)log10((double)std::max(tex->mHeight,tex->mWidth))+1; for (unsigned int y = 0; y < tex->mHeight;++y) { for (unsigned int x = 0; x < tex->mWidth;++x) { aiTexel* tx = tex->pcData + y*tex->mWidth+x; @@ -1094,7 +1096,7 @@ void WriteDump(const aiScene* scene, FILE* out, const char* src, const char* cmd fprintf(out,"\n",scene->mNumMeshes); for (unsigned int i = 0; i < scene->mNumMeshes;++i) { aiMesh* mesh = scene->mMeshes[i]; - const unsigned int width = (unsigned int)log10((double)mesh->mNumVertices)+1; + // const unsigned int width = (unsigned int)log10((double)mesh->mNumVertices)+1; // mesh header fprintf(out,"\t\n",