Fixes for uninitialized variable warnings.
parent
a90e208e6d
commit
9b591fadb8
|
@ -232,7 +232,7 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input,
|
||||||
|
|
||||||
// compute length based on type and check against the stored value
|
// compute length based on type and check against the stored value
|
||||||
if(encoding == 0) {
|
if(encoding == 0) {
|
||||||
uint32_t stride;
|
uint32_t stride = 0;
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case 'f':
|
case 'f':
|
||||||
|
@ -248,6 +248,7 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input,
|
||||||
default:
|
default:
|
||||||
ai_assert(false);
|
ai_assert(false);
|
||||||
};
|
};
|
||||||
|
ai_assert(stride > 0);
|
||||||
if(length * stride != comp_len) {
|
if(length * stride != comp_len) {
|
||||||
TokenizeError("cannot ReadData, calculated data stride differs from what the file claims",input, cursor);
|
TokenizeError("cannot ReadData, calculated data stride differs from what the file claims",input, cursor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1848,7 +1848,7 @@ private:
|
||||||
}}
|
}}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const AnimationCurveNode* curve_node;
|
const AnimationCurveNode* curve_node = NULL;
|
||||||
BOOST_FOREACH(const AnimationCurveNode* node, curves) {
|
BOOST_FOREACH(const AnimationCurveNode* node, curves) {
|
||||||
ai_assert(node);
|
ai_assert(node);
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
|
||||||
}
|
}
|
||||||
|
|
||||||
// data is given in floats, simply copy it
|
// data is given in floats, simply copy it
|
||||||
unsigned int iWrite;
|
unsigned int iWrite = 0;
|
||||||
if( aiPTI_Float == prop->mType || aiPTI_Buffer == prop->mType) {
|
if( aiPTI_Float == prop->mType || aiPTI_Buffer == prop->mType) {
|
||||||
iWrite = prop->mDataLength / sizeof(float);
|
iWrite = prop->mDataLength / sizeof(float);
|
||||||
if (pMax) {
|
if (pMax) {
|
||||||
|
@ -175,7 +175,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
|
||||||
}
|
}
|
||||||
|
|
||||||
// data is given in ints, simply copy it
|
// data is given in ints, simply copy it
|
||||||
unsigned int iWrite;
|
unsigned int iWrite = 0;
|
||||||
if( aiPTI_Integer == prop->mType || aiPTI_Buffer == prop->mType) {
|
if( aiPTI_Integer == prop->mType || aiPTI_Buffer == prop->mType) {
|
||||||
iWrite = prop->mDataLength / sizeof(int32_t);
|
iWrite = prop->mDataLength / sizeof(int32_t);
|
||||||
if (pMax) {
|
if (pMax) {
|
||||||
|
|
Loading…
Reference in New Issue