Browse Source

- BUGFIX : Fix compiler warning ( not referenced parameter ).
- BUGFIX : Fix compiler warning ( constant condition ).

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@491 67173fc5-114c-0410-ac8e-9d2fd5bffc1f

kimmi 16 years ago
parent
commit
e85bd7d5b9
2 changed files with 7 additions and 5 deletions
  1. 2 2
      code/LWOAnimation.cpp
  2. 5 3
      code/LWOBLoader.cpp

+ 2 - 2
code/LWOAnimation.cpp

@@ -315,8 +315,8 @@ void AnimResolver::DoInterpolation2(std::vector<LWO::Key>::const_iterator beg,
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Subsample animation track by given key values
 // Subsample animation track by given key values
-void AnimResolver::SubsampleAnimTrack(std::vector<aiVectorKey>& out,
-	double time,double sample_delta)
+void AnimResolver::SubsampleAnimTrack(std::vector<aiVectorKey>& /*out*/,
+	double /*time*/ ,double /*sample_delta*/ )
 {
 {
 	ai_assert(out.empty() && sample_delta);
 	ai_assert(out.empty() && sample_delta);
 
 

+ 5 - 3
code/LWOBLoader.cpp

@@ -54,7 +54,8 @@ using namespace Assimp;
 void LWOImporter::LoadLWOBFile()
 void LWOImporter::LoadLWOBFile()
 {
 {
 	LE_NCONST uint8_t* const end = mFileBuffer + fileSize;
 	LE_NCONST uint8_t* const end = mFileBuffer + fileSize;
-	while (true)
+	bool running = true;
+	while (running)
 	{
 	{
 		if (mFileBuffer + sizeof(IFF::ChunkHeader) > end)break;
 		if (mFileBuffer + sizeof(IFF::ChunkHeader) > end)break;
 		LE_NCONST IFF::ChunkHeader* const head = IFF::LoadChunk(mFileBuffer);
 		LE_NCONST IFF::ChunkHeader* const head = IFF::LoadChunk(mFileBuffer);
@@ -229,7 +230,8 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
 	LWO::Texture* pTex = NULL;
 	LWO::Texture* pTex = NULL;
 
 
 	GetS0(surf.mName,size);
 	GetS0(surf.mName,size);
-	while (true)	{
+	bool runnning = true;
+	while (runnning)	{
 		if (mFileBuffer + 6 >= end)
 		if (mFileBuffer + 6 >= end)
 			break;
 			break;
 
 
@@ -244,7 +246,7 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
 		 */
 		 */
 		if (mFileBuffer + head->length > end) {
 		if (mFileBuffer + head->length > end) {
 			DefaultLogger::get()->error("LWOB: Invalid surface chunk length. Trying to continue.");
 			DefaultLogger::get()->error("LWOB: Invalid surface chunk length. Trying to continue.");
-			head->length = end - mFileBuffer;
+			head->length = (uint16_t) (end - mFileBuffer);
 		}
 		}
 
 
 		uint8_t* const next = mFileBuffer+head->length;
 		uint8_t* const next = mFileBuffer+head->length;