diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-09-17 10:11:06 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-09-17 10:11:06 +0400 |
commit | 672a66905b0aca8a7099de3743d1e42059c4fc98 (patch) | |
tree | 1c2af82bce01b8f676ebf908a1ec710bb675dba8 /source/blender/python/api2_2x | |
parent | a48f15e124ef441d5f644f49899e4939aa13dff3 (diff) |
Patch/Bugfix #7334 by 'gsr b3d:
Some more compiler warning fixes. Some of these seem to be specific to GCC 4.1
Diffstat (limited to 'source/blender/python/api2_2x')
-rw-r--r-- | source/blender/python/api2_2x/Mesh.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Noise.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Pose.c | 5 | ||||
-rw-r--r-- | source/blender/python/api2_2x/bpy_data.c | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c index 6967b64da72..d2cc1edf3c3 100644 --- a/source/blender/python/api2_2x/Mesh.c +++ b/source/blender/python/api2_2x/Mesh.c @@ -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; diff --git a/source/blender/python/api2_2x/Noise.c b/source/blender/python/api2_2x/Noise.c index 5253ea810b0..c1a41d46714 100644 --- a/source/blender/python/api2_2x/Noise.c +++ b/source/blender/python/api2_2x/Noise.c @@ -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] ); } diff --git a/source/blender/python/api2_2x/Pose.c b/source/blender/python/api2_2x/Pose.c index ed25c15c9f5..47ae96b2286 100644 --- a/source/blender/python/api2_2x/Pose.c +++ b/source/blender/python/api2_2x/Pose.c @@ -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); diff --git a/source/blender/python/api2_2x/bpy_data.c b/source/blender/python/api2_2x/bpy_data.c index b775c0a8236..edb894bd982 100644 --- a/source/blender/python/api2_2x/bpy_data.c +++ b/source/blender/python/api2_2x/bpy_data.c @@ -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, |