Patch/Bugfix #7334 by 'gsr b3d:

Some more compiler warning fixes. Some of these seem to be specific to GCC 4.1
This commit is contained in:
Joshua Leung 2007-09-17 06:11:06 +00:00
parent a48f15e124
commit 672a66905b
12 changed files with 19 additions and 11 deletions

@ -103,6 +103,7 @@ void AttributeList::readMat4Gfx(string name, ntlMat4Gfx defaultValue, string sou
// set that a parameter can be given, and will be ignored...
bool AttributeList::ignoreParameter(string name, string source) {
name=source=(""); // remove warning
return false;
}

@ -325,6 +325,7 @@ void ParticleTracer::getTriangles(double time, vector<ntlTriangle> *triangles,
// suppress warnings...
vertices = NULL; triangles = NULL;
normals = NULL; objectId = 0;
time = 0.0;
#else // ELBEEM_PLUGIN
int pcnt = 0;
// currently not used in blender

@ -1345,8 +1345,8 @@ static PyObject *Mesh_getProperty_internal(CustomData *data, int eindex, PyObjec
static PyObject *Mesh_setProperty_internal(CustomData *data, int eindex, PyObject *args)
{
CustomDataLayer *layer;
int i,index, type = -1;
float f;
int i = 0, index, type = -1;
float f = 0.0f;
char *s=NULL, *name=NULL;
MFloatProperty *pf;
MIntProperty *pi;

@ -199,7 +199,7 @@ static PyObject *Noise_random( PyObject * self )
static PyObject *Noise_randuvec( PyObject * self )
{
float v[3];
float v[3] = {0.0f, 0.0f, 0.0f};
randuvec( v );
return Py_BuildValue( "[fff]", v[0], v[1], v[2] );
}

@ -693,9 +693,12 @@ static int PoseBone_setLocalMatrix(BPy_PoseBone *self, PyObject *value, void *cl
}
//get loc
if (matsize == 4){
if (matsize == 4) {
VECCOPY(loc, matrix->matrix[3]);
}
else {
loc[0]= loc[1]= loc[2]= 0.0f;
}
//copy new attributes
VECCOPY(self->posechannel->size, size);

@ -407,7 +407,7 @@ PyObject *LibBlockSeq_new(BPy_LibBlockSeq *self, PyObject * args, PyObject *kwd)
static char *kwlist[] = {"name", "filename", NULL};
if(PyArg_ParseTupleAndKeywords(args, kwd, "|ss", kwlist, &name, &filename) && filename ) {
PyObject *ret;
PyObject *ret= NULL;
if (strlen(filename) > FILE_MAXDIR + FILE_MAXFILE - 1)
return ( EXPP_ReturnPyObjError( PyExc_IOError,

@ -1390,7 +1390,7 @@ void do_material_tex(ShadeInput *shi)
TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
float *co = NULL, *dx = NULL, *dy = NULL;
float fact, facm, factt, facmm, stencilTin=1.0;
float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3], Tnor=1.0;
float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3]={0.0f, 0.0f, 0.0f}, Tnor=1.0;
int tex_nr, rgbnor= 0, warpdone=0;
if (R.r.scemode & R_NO_TEX) return;

@ -1538,7 +1538,7 @@ void mesh_copy_menu(void)
error("mesh has no color layers");
return;
} else {
/* guess teh 4th color if needs be */
/* guess the 4th color if needs be */
float val =- 1;
if (!efa_act->v4) {

@ -980,7 +980,7 @@ void transform_nlachannel_keys(int mode, int dummy)
bActionChannel *chan;
bActionStrip *strip;
bConstraintChannel *conchan;
float sval[2], cval[2], lastcval[2];
float sval[2], cval[2], lastcval[2]= {0.0f, 0.0f};
float fac=0.0F;
float deltax, startx;
int i;
@ -1077,7 +1077,7 @@ void transform_nlachannel_keys(int mode, int dummy)
for (chan=base->object->action->chanbase.first; chan; chan=chan->next){
if (EDITABLE_ACHAN(chan)) {
tvtot=add_trans_ipo_keys(chan->ipo, tv, tvtot);
/* Manipulate action constraint ipos */
if (EXPANDED_ACHAN(chan) && FILTER_CON_ACHAN(chan)) {
for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) {

@ -3074,7 +3074,7 @@ static void splitarea_interactive(ScrArea *area, ScrEdge *onedge)
ScrArea *scr, *sa= area;
float fac= 0.0;
unsigned short event;
short ok= 0, val, split = 0, mval[2], mvalo[2], first= 1;
short ok= 0, val, split = 0, mval[2], mvalo[2]= {-1, -1}, first= 1;
char dir;
if(sa->win==0) return;

@ -1972,6 +1972,9 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
if (t->around == V3D_LOCAL) {
VECCOPY(center, t->center);
}
else {
center[0] = center[1] = center[2] = 0.0f;
}
VecRotToMat3(axis, angle, mat);

@ -139,7 +139,7 @@ void getViewVector(float coord[3], float vec[3])
static void clipMirrorModifier(TransInfo *t, Object *ob)
{
ModifierData *md= ob->modifiers.first;
float tolerance[3];
float tolerance[3] = {0.0f, 0.0f, 0.0f};
int axis = 0;
for (; md; md=md->next) {