- BUGFIX : Fixed compiler warning ( constant condition ).

- BUGFIX : Fixed compiler warning ( not referenced parameter ).

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@490 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
kimmi 2009-10-10 11:59:00 +00:00
parent fe1c9ec3d0
commit 5c1804f3ad
2 changed files with 31 additions and 17 deletions

View File

@ -61,13 +61,13 @@ using namespace Assimp::XFile;
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Dummy memory wrappers for use with zlib // Dummy memory wrappers for use with zlib
void* dummy_alloc (void* opaque, unsigned int items, unsigned int size) { void* dummy_alloc (void* /*opaque*/, unsigned int items, unsigned int size) {
// we're using calloc to make it easier to debug the whole stuff // we're using calloc to make it easier to debug the whole stuff
return ::calloc(items,size); return ::calloc(items,size);
} }
void dummy_free (void* opaque, void* address) { void dummy_free (void* /*opaque*/, void* address) {
return ::free(address); return ::free(address);
} }
@ -265,7 +265,8 @@ XFileParser::~XFileParser()
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
void XFileParser::ParseFile() void XFileParser::ParseFile()
{ {
while( 1) bool running = true;
while( running )
{ {
// read name of next object // read name of next object
std::string objectName = GetNextToken(); std::string objectName = GetNextToken();
@ -323,7 +324,8 @@ void XFileParser::ParseDataObjectTemplate()
std::string guid = GetNextToken(); std::string guid = GetNextToken();
// read and ignore data members // read and ignore data members
while(true) bool running = true;
while ( running )
{ {
std::string s = GetNextToken(); std::string s = GetNextToken();
@ -378,7 +380,8 @@ void XFileParser::ParseDataObjectFrame( Node* pParent)
// Now inside a frame. // Now inside a frame.
// read tokens until closing brace is reached. // read tokens until closing brace is reached.
while(true) bool running = true;
while ( running )
{ {
std::string objectName = GetNextToken(); std::string objectName = GetNextToken();
if (objectName.size() == 0) if (objectName.size() == 0)
@ -458,7 +461,8 @@ void XFileParser::ParseDataObjectMesh( Mesh* pMesh)
} }
// here, other data objects may follow // here, other data objects may follow
while(true) bool running = true;
while ( running )
{ {
std::string objectName = GetNextToken(); std::string objectName = GetNextToken();
@ -538,7 +542,7 @@ void XFileParser::ParseDataObjectSkinWeights( Mesh *pMesh)
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
void XFileParser::ParseDataObjectSkinMeshHeader( Mesh* pMesh) void XFileParser::ParseDataObjectSkinMeshHeader( Mesh* /*pMesh*/ )
{ {
readHeadOfDataObject(); readHeadOfDataObject();
@ -662,7 +666,8 @@ void XFileParser::ParseDataObjectMeshMaterialList( Mesh* pMesh)
pMesh->mFaceMaterials.push_back( pMesh->mFaceMaterials.front()); pMesh->mFaceMaterials.push_back( pMesh->mFaceMaterials.front());
// read following data objects // read following data objects
while(true) bool running = true;
while ( running )
{ {
std::string objectName = GetNextToken(); std::string objectName = GetNextToken();
if( objectName.size() == 0) if( objectName.size() == 0)
@ -713,7 +718,8 @@ void XFileParser::ParseDataObjectMaterial( Material* pMaterial)
pMaterial->mEmissive = ReadRGB(); pMaterial->mEmissive = ReadRGB();
// read other data objects // read other data objects
while(true) bool running = true;
while ( running )
{ {
std::string objectName = GetNextToken(); std::string objectName = GetNextToken();
if( objectName.size() == 0) if( objectName.size() == 0)
@ -761,7 +767,8 @@ void XFileParser::ParseDataObjectAnimationSet()
mScene->mAnims.push_back( anim); mScene->mAnims.push_back( anim);
anim->mName = animName; anim->mName = animName;
while(true) bool running = true;
while ( running )
{ {
std::string objectName = GetNextToken(); std::string objectName = GetNextToken();
if( objectName.length() == 0) if( objectName.length() == 0)
@ -787,7 +794,8 @@ void XFileParser::ParseDataObjectAnimation( Animation* pAnim)
AnimBone* banim = new AnimBone; AnimBone* banim = new AnimBone;
pAnim->mAnims.push_back( banim); pAnim->mAnims.push_back( banim);
while(true) bool running = true;
while( running )
{ {
std::string objectName = GetNextToken(); std::string objectName = GetNextToken();
@ -930,7 +938,8 @@ void XFileParser::ParseDataObjectTextureFilename( std::string& pName)
void XFileParser::ParseUnknownDataObject() void XFileParser::ParseUnknownDataObject()
{ {
// find opening delimiter // find opening delimiter
while( true) bool running = true;
while( running )
{ {
std::string t = GetNextToken(); std::string t = GetNextToken();
if( t.length() == 0) if( t.length() == 0)
@ -1128,7 +1137,8 @@ void XFileParser::FindNextNoneWhiteSpace()
if( mIsBinaryFormat) if( mIsBinaryFormat)
return; return;
while( true) bool running = true;
while( running )
{ {
while( P < End && isspace( (unsigned char) *P)) while( P < End && isspace( (unsigned char) *P))
{ {

View File

@ -47,7 +47,8 @@ inline unsigned int strtol10( const char* in, const char** out=0)
{ {
unsigned int value = 0; unsigned int value = 0;
while ( 1 ) bool running = true;
while ( running )
{ {
if ( *in < '0' || *in > '9' ) if ( *in < '0' || *in > '9' )
break; break;
@ -66,7 +67,8 @@ inline unsigned int strtol8( const char* in, const char** out=0)
{ {
unsigned int value = 0; unsigned int value = 0;
while ( 1 ) bool running = true;
while ( running )
{ {
if ( *in < '0' || *in > '7' ) if ( *in < '0' || *in > '7' )
break; break;
@ -85,7 +87,8 @@ inline unsigned int strtol16( const char* in, const char** out=0)
{ {
unsigned int value = 0; unsigned int value = 0;
while ( 1 ) bool running = true;
while ( running )
{ {
if ( *in >= '0' && *in <= '9' ) if ( *in >= '0' && *in <= '9' )
{ {
@ -176,7 +179,8 @@ inline uint64_t strtol10_64( const char* in, const char** out=0, unsigned int* m
unsigned int cur = 0; unsigned int cur = 0;
uint64_t value = 0; uint64_t value = 0;
while ( 1 ) bool running = true;
while ( running )
{ {
if ( *in < '0' || *in > '9' ) if ( *in < '0' || *in > '9' )
break; break;