Fixes for uninitialized variable warnings.

This commit is contained in:
Sherief Farouk
2013-08-09 19:52:15 -04:00
parent a90e208e6d
commit 9b591fadb8
3 changed files with 5 additions and 4 deletions

View File

@@ -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
if(encoding == 0) {
uint32_t stride;
uint32_t stride = 0;
switch(type)
{
case 'f':
@@ -248,6 +248,7 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input,
default:
ai_assert(false);
};
ai_assert(stride > 0);
if(length * stride != comp_len) {
TokenizeError("cannot ReadData, calculated data stride differs from what the file claims",input, cursor);
}