Merge pull request #1444 from turol/warnings

Clean up some more GCC warnings
pull/1461/head
Kim Kulling 2017-09-20 22:18:21 +02:00 committed by GitHub
commit b5ac248703
6 changed files with 9 additions and 8 deletions

View File

@ -253,7 +253,7 @@ public:
* a compiler complain is the result.
* @param dest Destination value to be written
* @param db File database, including input stream. */
template <typename T> inline void Convert (T& dest, const FileDatabase& db) const;
template <typename T> void Convert (T& dest, const FileDatabase& db) const;
// --------------------------------------------------------
// generic converter

View File

@ -674,7 +674,7 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
// create morph target meshes if any
std::vector<aiMesh*> targetMeshes;
std::vector<float> targetWeights;
Collada::MorphMethod method;
Collada::MorphMethod method = Collada::Normalized;
for(std::map<std::string, Collada::Controller>::const_iterator it = pParser.mControllerLibrary.begin();
it != pParser.mControllerLibrary.end(); it++)

View File

@ -168,7 +168,7 @@ struct FIBase64ValueImpl: public FIBase64Value {
if (!strValueValid) {
strValueValid = true;
std::ostringstream os;
uint8_t c1, c2;
uint8_t c1 = 0, c2;
int imod3 = 0;
std::vector<uint8_t>::size_type valueSize = value.size();
for (std::vector<uint8_t>::size_type i = 0; i < valueSize; ++i) {

View File

@ -170,9 +170,10 @@ void PLYImporter::InternReadFile(const std::string& pFile,
std::vector<char> headerCheck;
streamedBuffer.getNextLine(headerCheck);
if ((headerCheck.size() >= 3) && (headerCheck[0] != 'P' && headerCheck[0] != 'p') ||
if ((headerCheck.size() < 3) ||
(headerCheck[0] != 'P' && headerCheck[0] != 'p') ||
(headerCheck[1] != 'L' && headerCheck[1] != 'l') ||
(headerCheck[2] != 'Y' && headerCheck[2] != 'y'))
(headerCheck[2] != 'Y' && headerCheck[2] != 'y') )
{
streamedBuffer.close();
throw DeadlyImportError("Invalid .ply file: Magic number \'ply\' is no there");

View File

@ -534,7 +534,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref<Mesh>& meshRef, Ref<Buf
Ref<Node> nodeRef = mAsset.nodes.Get(aib->mName.C_Str());
nodeRef->jointName = nodeRef->name;
unsigned int jointNamesIndex;
unsigned int jointNamesIndex = 0;
bool addJointToJointNames = true;
for ( unsigned int idx_joint = 0; idx_joint < skinRef->jointNames.size(); ++idx_joint) {
if (skinRef->jointNames[idx_joint]->jointName.compare(nodeRef->jointName) == 0) {

View File

@ -444,7 +444,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref<Mesh>& meshRef, Ref<Buf
Ref<Node> nodeRef = mAsset.nodes.Get(aib->mName.C_Str());
nodeRef->jointName = nodeRef->id;
unsigned int jointNamesIndex;
unsigned int jointNamesIndex = 0;
bool addJointToJointNames = true;
for ( unsigned int idx_joint = 0; idx_joint < skinRef->jointNames.size(); ++idx_joint) {
if (skinRef->jointNames[idx_joint]->jointName.compare(nodeRef->jointName) == 0) {