Silence errors in Valgrind

This commit is contained in:
Richard Allen 2012-03-30 19:54:25 +00:00
parent d5a583c32b
commit fb64c2b09f

View file

@ -611,11 +611,13 @@ static qboolean R_LoadMD3(model_t * mod, int lod, void *buffer, int bufferSize,
// calc tangent spaces // calc tangent spaces
{ {
const float *v0, *v1, *v2; // Valgrind complaints: Conditional jump or move depends on uninitialised value(s)
const float *t0, *t1, *t2; // So lets Initialize them.
vec3_t tangent; const float *v0 = NULL, *v1 = NULL, *v2 = NULL;
vec3_t bitangent; const float *t0 = NULL, *t1 = NULL, *t2 = NULL;
vec3_t normal; vec3_t tangent = { 0, 0, 0 };
vec3_t bitangent = { 0, 0, 0 };
vec3_t normal = { 0, 0, 0 };
for(j = 0, v = surf->verts; j < (surf->numVerts * mdvModel->numFrames); j++, v++) for(j = 0, v = surf->verts; j < (surf->numVerts * mdvModel->numFrames); j++, v++)
{ {