Get rid of warnings on GCC4.4 with -wall

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@541 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2010-02-06 23:52:41 +00:00
parent 7dcbff5d5c
commit 17326515d4
33 changed files with 206 additions and 125 deletions

View File

@@ -103,9 +103,9 @@ void PLYImporter::InternReadFile( const std::string& pFile,
mBuffer = (unsigned char*)&mBuffer2[0];
// the beginning of the file must be PLY - magic, magic
if (mBuffer[0] != 'P' && mBuffer[0] != 'p' ||
mBuffer[1] != 'L' && mBuffer[1] != 'l' ||
mBuffer[2] != 'Y' && mBuffer[2] != 'y') {
if ((mBuffer[0] != 'P' && mBuffer[0] != 'p') ||
(mBuffer[1] != 'L' && mBuffer[1] != 'l') ||
(mBuffer[2] != 'Y' && mBuffer[2] != 'y')) {
throw new ImportErrorException( "Invalid .ply file: Magic number \'ply\' is no there");
}
@@ -373,7 +373,7 @@ void PLYImporter::LoadTextureCoordinates(std::vector<aiVector2D>* pvOut)
ai_assert(NULL != pvOut);
unsigned int aiPositions[2] = {0xFFFFFFFF,0xFFFFFFFF};
PLY::EDataType aiTypes[2];
PLY::EDataType aiTypes[2] = {EDT_Char,EDT_Char};
PLY::ElementInstanceList* pcList = NULL;
unsigned int cnt = 0;
@@ -441,7 +441,7 @@ void PLYImporter::LoadVertices(std::vector<aiVector3D>* pvOut, bool p_bNormals)
ai_assert(NULL != pvOut);
unsigned int aiPositions[3] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF};
PLY::EDataType aiTypes[3];
PLY::EDataType aiTypes[3] = {EDT_Char,EDT_Char,EDT_Char};
PLY::ElementInstanceList* pcList = NULL;
unsigned int cnt = 0;
@@ -587,7 +587,7 @@ void PLYImporter::LoadVertexColor(std::vector<aiColor4D>* pvOut)
ai_assert(NULL != pvOut);
unsigned int aiPositions[4] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF};
PLY::EDataType aiTypes[4];
PLY::EDataType aiTypes[4] = {EDT_Char, EDT_Char, EDT_Char, EDT_Char}; // silencing gcc
unsigned int cnt = 0;
PLY::ElementInstanceList* pcList = NULL;
@@ -689,12 +689,12 @@ void PLYImporter::LoadFaces(std::vector<PLY::Face>* pvOut)
// index of the vertex index list
unsigned int iProperty = 0xFFFFFFFF;
PLY::EDataType eType;
PLY::EDataType eType = EDT_Char;
bool bIsTristrip = false;
// index of the material index property
unsigned int iMaterialIndex = 0xFFFFFFFF;
PLY::EDataType eType2;
PLY::EDataType eType2 = EDT_Char;
// serach in the DOM for a face entry
unsigned int _i = 0;
@@ -882,15 +882,18 @@ void PLYImporter::LoadMaterial(std::vector<MaterialHelper*>* pvOut)
{0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
};
// dto.
PLY::EDataType aaiTypes[3][4];
PLY::EDataType aaiTypes[3][4] = {
{EDT_Char,EDT_Char,EDT_Char,EDT_Char},
{EDT_Char,EDT_Char,EDT_Char,EDT_Char},
{EDT_Char,EDT_Char,EDT_Char,EDT_Char}
};
PLY::ElementInstanceList* pcList = NULL;
unsigned int iPhong = 0xFFFFFFFF;
PLY::EDataType ePhong;
PLY::EDataType ePhong = EDT_Char;
unsigned int iOpacity = 0xFFFFFFFF;
PLY::EDataType eOpacity;
PLY::EDataType eOpacity = EDT_Char;
// serach in the DOM for a vertex entry
unsigned int _i = 0;