Maybe this is me, but this chunk of code:
void test(model_type *model) { register int n; model_texture_type *texture;
texture=model->textures;
for (n=0;n!=max_model_texture;n++) { texture->bitmaps[0].name[0]=0x0; texture++; } }
Returns: "warning: 'texture' is used uninitialized in this function"
Note that the definition of model_type is:
typedef struct { ... other stuff .... model_texture_type *textures; } model_type;
If I leave in this code (it's in a larger function) I get corruption in other data, as if texture REALLY isn't initialized (though it obviously is.)
I can fix this by substituting:
BlockZeroUncached(model->textures,(max_model_texture*sizeof(model_texture_type)));
And there's no more corruption in the code. This code compiled fine in gcc 3.3.
[>] Brian |