Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorKen Hughes <khughes@pacific.edu>2006-11-17 20:50:43 +0300
committerKen Hughes <khughes@pacific.edu>2006-11-17 20:50:43 +0300
commit318a694a2592af3324df5b0bde2a66db67f55145 (patch)
treec636131e9268c142b16d9c6d920aec1c8194c1af /source
parent27c42ee06233e889f95ac5114f785c6b354c176f (diff)
Get rid of various warnings with gcc under linux
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/api2_2x/Image.c1
-rw-r--r--source/blender/python/api2_2x/Ipo.c2
-rw-r--r--source/blender/python/api2_2x/Scene.c7
-rw-r--r--source/blender/python/api2_2x/constant.c31
-rw-r--r--source/blender/python/api2_2x/vector.c3
-rw-r--r--source/blender/src/editmesh_tools.c4
-rw-r--r--source/blender/src/editseq.c1
7 files changed, 11 insertions, 38 deletions
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c
index d6458c12435..bc3748f1720 100644
--- a/source/blender/python/api2_2x/Image.c
+++ b/source/blender/python/api2_2x/Image.c
@@ -37,6 +37,7 @@
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_image.h"
+#include "BKE_idprop.h"
#include "BIF_drawimage.h"
#include "BLI_blenlib.h"
#include "DNA_space_types.h" /* FILE_MAXDIR = 160 */
diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c
index 0ed1a84ed01..69faf742f5a 100644
--- a/source/blender/python/api2_2x/Ipo.c
+++ b/source/blender/python/api2_2x/Ipo.c
@@ -366,7 +366,7 @@ PyTypeObject Ipo_Type = {
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
- ( reprfunc ) Ipo_compare, /* cmpfunc tp_compare; */
+ ( cmpfunc ) Ipo_compare, /* cmpfunc tp_compare; */
( reprfunc ) Ipo_repr, /* reprfunc tp_repr; */
/* Method suites for standard classes */
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c
index 150aa0b9fd3..f76da8f6174 100644
--- a/source/blender/python/api2_2x/Scene.c
+++ b/source/blender/python/api2_2x/Scene.c
@@ -45,6 +45,7 @@ struct View3D;
#include "BKE_library.h"
#include "BKE_scene.h"
#include "BKE_font.h"
+#include "BKE_idprop.h"
#include "BLI_blenlib.h" /* only for SceneObSeq_new */
#include "BSE_drawview.h" /* for play_anim */
#include "BSE_headerbuttons.h" /* for copy_scene */
@@ -286,7 +287,7 @@ static PyObject *Scene_getAttr( BPy_Scene * self, char *name )
/* accept both Layer (for compatibility with ob.Layer) and Layers */
else if( strncmp( name, "Layer", 5 ) == 0 )
- attr = PyInt_FromLong( self->scene->lay & (1<<20)-1 );
+ attr = PyInt_FromLong( self->scene->lay & ((1<<20)-1) );
/* Layers returns a bitmask, layers returns a list of integers */
else if( strcmp( name, "layers") == 0)
return Scene_getLayers(self);
@@ -1296,7 +1297,7 @@ static PyObject *SceneObSeq_add( BPy_SceneObSeq * self, PyObject *pyobj )
static PyObject *SceneObSeq_new( BPy_SceneObSeq * self, PyObject *args )
{
void *data = NULL;
- short type;
+ short type = OB_EMPTY;
struct Object *object;
Base *base;
PyObject *py_data;
@@ -1424,7 +1425,7 @@ static PyObject *SceneObSeq_new( BPy_SceneObSeq * self, PyObject *args )
base->object = object; /* link object to the new base */
- base->lay= object->lay = scene->lay & (1<<20)-1; /* Layer, by default visible*/
+ base->lay= object->lay = scene->lay & ((1<<20)-1); /* Layer, by default visible*/
base->flag = SELECT;
object->id.us = 1; /* we will exist once in this scene */
diff --git a/source/blender/python/api2_2x/constant.c b/source/blender/python/api2_2x/constant.c
index 55b9d9c41a6..45af1f1b96d 100644
--- a/source/blender/python/api2_2x/constant.c
+++ b/source/blender/python/api2_2x/constant.c
@@ -113,33 +113,7 @@ static int constantAssSubscript(BPy_constant *self, PyObject *who, PyObject *car
{
return 0; /* no user assignments allowed */
}
-//------------------------tp_getattr
-static PyObject *constant_getAttr(BPy_constant * self, char *name)
-{
- if(self->dict) {
- PyObject *v;
-
- if(!strcmp(name, "__members__"))
- return PyDict_Keys(self->dict);
-
- if(!strcmp(name, "__methods__")) {
- PyObject *value = PyString_FromString ( name );
- v = PyObject_GenericGetAttr( (PyObject *)self, value );
- Py_DECREF( value);
- return v;
- }
-
- v = PyDict_GetItemString(self->dict, name);
- if(v) {
- return EXPP_incr_ret(v); /* was a borrowed ref */
- }
- return (EXPP_ReturnPyObjError(PyExc_AttributeError,
- "attribute not found"));
- }
- return (EXPP_ReturnPyObjError(PyExc_RuntimeError,
- "constant object lacks a dictionary"));
-}
-
+//------------------------tp_getattro
static PyObject *constant_getAttro(BPy_constant * self, PyObject *value)
{
if(self->dict) {
@@ -212,8 +186,7 @@ PyTypeObject constant_Type = {
0, //tp_itemsize
(destructor)constant_dealloc, //tp_dealloc
0, //tp_print
- // (getattrfunc)constant_getAttr, //tp_getattr
- 0, //tp_getattr
+ 0, //tp_getattr
0, //tp_setattr
0, //tp_compare
(reprfunc) constant_repr, //tp_repr
diff --git a/source/blender/python/api2_2x/vector.c b/source/blender/python/api2_2x/vector.c
index e6cce38dd11..8b5351ca9c3 100644
--- a/source/blender/python/api2_2x/vector.c
+++ b/source/blender/python/api2_2x/vector.c
@@ -645,7 +645,6 @@ static PyObject *Vector_imul(PyObject * v1, PyObject * v2)
} else if (MatrixObject_Check(v2)) {
float vecCopy[4];
- double dot;
int x,y, size= vec->size;
MatrixObject *mat= (MatrixObject*)v2;
@@ -664,11 +663,11 @@ static PyObject *Vector_imul(PyObject * v1, PyObject * v2)
/*muliplication*/
for(x = 0, i = 0; x < mat->colSize; x++) {
+ double dot = 0.0f;
for(y = 0; y < mat->rowSize; y++) {
dot += mat->matrix[y][x] * vecCopy[y];
}
vec->vec[i++] = (float)dot;
- dot = 0.0f;
}
Py_INCREF( v1 );
return v1;
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c
index 635937bc7af..e0f01d0695d 100644
--- a/source/blender/src/editmesh_tools.c
+++ b/source/blender/src/editmesh_tools.c
@@ -3155,10 +3155,10 @@ static float isfaceConcave(float fake[4][3])
areaB = AreaT3Dfl(fake[1], fake[2], fake[3]) + AreaT3Dfl(fake[3], fake[0], fake[1]);
if(areaA <= areaB) minarea = areaA;
- else if(areaB < areaA) minarea = areaB;
+ else minarea = areaB;
if(areaA >= areaB) maxarea = areaA;
- else if(areaB > areaA) maxarea = areaB;
+ else maxarea = areaB;
if(!maxarea) return 1;
else return 1 - (minarea / maxarea);
diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c
index 62704c5abda..48832a29093 100644
--- a/source/blender/src/editseq.c
+++ b/source/blender/src/editseq.c
@@ -1121,7 +1121,6 @@ static int add_seq_effect(int type, char *str)
int cfra, machine;
short mval[2];
struct SeqEffectHandle sh;
- int mode;
if(G.scene->ed==0) return 0;
ed= G.scene->ed;