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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-05-26 14:44:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-26 14:44:14 +0400
commite93d1ba8e775a481e9a719355b12d4523cabcae1 (patch)
treebf9425fceaabbf1abfea06625b59dc0addccfeeb
parentca4d741ce9865c696ef0e41c0c44dd916974d099 (diff)
Misc warnings
- Removed/Commented some unused vars - CValue::GetPropertyText() could return a temp reference to a variable on the stack, option wasnt used anywhere so removed. - KX_ConstraintWrapper::GetConstraintId allows args but ignored them - KX_ConstraintWrapper::PySetParam didnt return NULL on an error (messing up pythons exceptions). - BLI_natstrcmp didnt return 0 when the while loop exited
-rw-r--r--source/blender/blenkernel/bad_level_call_stubs/stubs.c3
-rw-r--r--source/blender/blenkernel/intern/anim.c2
-rw-r--r--source/blender/blenlib/intern/util.c2
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp2
-rw-r--r--source/blender/python/api2_2x/Geometry.c2
-rw-r--r--source/blender/src/butspace.c2
-rw-r--r--source/blender/src/buttons_editing.c2
-rw-r--r--source/blender/src/drawobject.c2
-rw-r--r--source/gameengine/Expressions/Value.cpp4
-rw-r--r--source/gameengine/Expressions/Value.h2
-rw-r--r--source/gameengine/GamePlayer/common/GPC_RenderTools.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_Camera.cpp1
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintWrapper.cpp17
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintWrapper.h3
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.cpp1
-rw-r--r--source/gameengine/VideoTexture/PyTypeList.cpp1
16 files changed, 19 insertions, 30 deletions
diff --git a/source/blender/blenkernel/bad_level_call_stubs/stubs.c b/source/blender/blenkernel/bad_level_call_stubs/stubs.c
index 3012c19ff02..1a33102f845 100644
--- a/source/blender/blenkernel/bad_level_call_stubs/stubs.c
+++ b/source/blender/blenkernel/bad_level_call_stubs/stubs.c
@@ -57,6 +57,7 @@ struct bConstraintOb;
struct bConstraintTarget;
struct ListBase;
struct EditFace;
+struct LOD_Decimation_Info;
char *getIpoCurveName( struct IpoCurve * icu );
void insert_vert_icu(struct IpoCurve *icu, float x, float y, short fast);
@@ -160,7 +161,7 @@ void BPY_pyconstraint_target(struct bPythonConstraint *con, struct bConstraintTa
void free_oops(struct Oops *oops){}
void exit_posemode(int freedata){}
void error(char *str, ...){}
-int okee(char *str, ...){}
+int okee(char *str, ...){return 1;}
/* anim.c */
ListBase editNurb;
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 50be417c8ef..ffb7ff51b87 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -747,7 +747,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
float ctime, pa_time, scale = 1.0f;
float tmat[4][4], mat[4][4], pamat[4][4], size=0.0;
float (*obmat)[4], (*oldobmat)[4];
- int lay, a, b, k, counter, hair = 0;
+ int lay, a, b, counter, hair = 0;
int totpart, totchild, totgroup=0, pa_num;
if(psys==0) return;
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index 842ebc4c0a9..e202d91f0e6 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -2030,7 +2030,7 @@ int BLI_natstrcmp(const char *s1, const char *s2)
d1++;
d2++;
}
-
+ return 0;
}
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 9e077cbc809..32d97d79bd7 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -865,7 +865,7 @@ static const char *exr_rgba_channelname(InputFile *file, const char *chan)
for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i)
{
- const Channel &channel = i.channel();
+ /* const Channel &channel = i.channel(); */ /* Not used yet */
const char *str= i.name();
int len= strlen(str);
if(len) {
diff --git a/source/blender/python/api2_2x/Geometry.c b/source/blender/python/api2_2x/Geometry.c
index 2ac6b8a714a..f875cbc52fb 100644
--- a/source/blender/python/api2_2x/Geometry.c
+++ b/source/blender/python/api2_2x/Geometry.c
@@ -488,7 +488,7 @@ static PyObject *M_Geometry_BezierInterp( PyObject * self, PyObject * args )
float k2[4] = {0.0, 0.0, 0.0, 0.0};
float h2[4] = {0.0, 0.0, 0.0, 0.0};
- float a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y, xi, yi, a1,a2,b1,b2, newvec[2];
+
if( !PyArg_ParseTuple ( args, "O!O!O!O!i",
&vector_Type, &vec_k1,
&vector_Type, &vec_h1,
diff --git a/source/blender/src/butspace.c b/source/blender/src/butspace.c
index ba4d02d2355..38d628d2056 100644
--- a/source/blender/src/butspace.c
+++ b/source/blender/src/butspace.c
@@ -511,7 +511,7 @@ void curvemap_buttons(uiBlock *block, CurveMapping *cumap, char labeltype, short
static void do_node_buts(unsigned short event)
{
Material *ma;
- SpaceNode *snode = curarea->spacedata.first;
+ /* SpaceNode *snode = curarea->spacedata.first; */
/* all operations default on active material layer here */
/* but this also gets called for lamp and world... */
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index 1ecc63fe93d..43fafeb387a 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -6437,7 +6437,7 @@ void brush_buttons(uiBlock *block, short sima,
}
else {
if (
- (sima==NULL) && /* 3D View */
+ (!sima) && /* 3D View */
(settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)==0 && /* Projection Painting */
(settings->imapaint.tool == PAINT_TOOL_CLONE)
) {
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index 5fb60449a25..ef37b184a85 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -2918,7 +2918,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt)
float cfra=bsystem_time(ob,(float)CFRA,0.0);
float *vdata=0, *vedata=0, *cdata=0, *ndata=0, *vd=0, *ved=0, *cd=0, *nd=0, xvec[3], yvec[3], zvec[3];
float ma_r=0.0f, ma_g=0.0f, ma_b=0.0f;
- int a, k, k_max=0, totpart, totpoint=0, draw_as, totchild=0;
+ int a, totpart, totpoint=0, draw_as, totchild=0;
int select=ob->flag&SELECT, create_cdata=0;
GLint polygonmode[2];
char val[32];
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index 773fd94a0fb..08249f92902 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -292,15 +292,13 @@ CValue* CValue::GetProperty(const char *inName)
//
// Get text description of property with name <inName>, returns an empty string if there is no property named <inName>
//
-const STR_String& CValue::GetPropertyText(const STR_String & inName,const char *deftext)
+const STR_String& CValue::GetPropertyText(const STR_String & inName)
{
const static STR_String sEmpty("");
CValue *property = GetProperty(inName);
if (property)
return property->GetText();
- else if (deftext)
- return STR_String(deftext);
else
return sEmpty;
}
diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h
index 0be76c4f452..29ef19b46c9 100644
--- a/source/gameengine/Expressions/Value.h
+++ b/source/gameengine/Expressions/Value.h
@@ -310,7 +310,7 @@ public:
virtual void SetProperty(const char* name,CValue* ioProperty);
virtual CValue* GetProperty(const char* inName); // Get pointer to a property with name <inName>, returns NULL if there is no property named <inName>
virtual CValue* GetProperty(const STR_String & inName);
- const STR_String& GetPropertyText(const STR_String & inName,const char *deftext=NULL); // Get text description of property with name <inName>, returns an empty string if there is no property named <inName>
+ const STR_String& GetPropertyText(const STR_String & inName); // Get text description of property with name <inName>, returns an empty string if there is no property named <inName>
float GetPropertyNumber(const STR_String& inName,float defnumber);
virtual bool RemoveProperty(const char *inName); // Remove the property named <inName>, returns true if the property was succesfully removed, false if property was not found or could not be removed
virtual vector<STR_String> GetPropertyNames();
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
index 1a0d985a864..02f23a8431b 100644
--- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
@@ -288,10 +288,7 @@ void GPC_RenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode,
int height)
{
STR_String tmpstr(text);
- int lines;
char* s = tmpstr.Ptr();
- char* p;
-
// Save and change OpenGL settings
int texture2D;
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp
index 144ff4ac883..1d6c5f77ae5 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -1105,7 +1105,6 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, getScreenRay,
"getScreenRay()\n"
)
{
- KX_Camera* cam;
MT_Vector3 vect;
double x,y,dist;
char *propName = NULL;
diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
index b40100db2f7..3e5594e0d1c 100644
--- a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
@@ -49,23 +49,20 @@ KX_ConstraintWrapper::~KX_ConstraintWrapper()
{
}
-PyObject* KX_ConstraintWrapper::PyGetConstraintId(PyObject* args, PyObject* kwds)
+PyObject* KX_ConstraintWrapper::PyGetConstraintId()
{
return PyInt_FromLong(m_constraintId);
}
PyObject* KX_ConstraintWrapper::PySetParam(PyObject* args, PyObject* kwds)
{
- int len = PyTuple_Size(args);
- int success = 1;
-
int dof;
float minLimit,maxLimit;
- success = PyArg_ParseTuple(args,"iff:setParam",&dof,&minLimit,&maxLimit);
- if (success)
- {
- m_physenv->setConstraintParam(m_constraintId,dof,minLimit,maxLimit);
- }
+
+ if (!PyArg_ParseTuple(args,"iff:setParam",&dof,&minLimit,&maxLimit))
+ return NULL;
+
+ m_physenv->setConstraintParam(m_constraintId,dof,minLimit,maxLimit);
Py_RETURN_NONE;
}
@@ -120,7 +117,7 @@ int KX_ConstraintWrapper::py_setattro(PyObject *attr,PyObject* value)
PyMethodDef KX_ConstraintWrapper::Methods[] = {
- {"getConstraintId",(PyCFunction) KX_ConstraintWrapper::sPyGetConstraintId, METH_VARARGS},
+ {"getConstraintId",(PyCFunction) KX_ConstraintWrapper::sPyGetConstraintId, METH_NOARGS},
{"setParam",(PyCFunction) KX_ConstraintWrapper::sPySetParam, METH_VARARGS},
{NULL,NULL} //Sentinel
};
diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.h b/source/gameengine/Ketsji/KX_ConstraintWrapper.h
index b8ac464ceab..d4f038e2898 100644
--- a/source/gameengine/Ketsji/KX_ConstraintWrapper.h
+++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.h
@@ -43,8 +43,7 @@ public:
virtual ~KX_ConstraintWrapper ();
int getConstraintId() { return m_constraintId;};
- KX_PYMETHOD(KX_ConstraintWrapper,TestMethod);
- KX_PYMETHOD(KX_ConstraintWrapper,GetConstraintId);
+ KX_PYMETHOD_NOARGS(KX_ConstraintWrapper,GetConstraintId);
KX_PYMETHOD(KX_ConstraintWrapper,SetParam);
private:
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp
index 0d1bc289a5c..11effa1ca98 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.cpp
+++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp
@@ -222,7 +222,6 @@ PyObject* KX_MeshProxy::PyGetVertex(PyObject* args, PyObject* kwds)
{
int vertexindex;
int matindex;
- PyObject* vertexob = NULL;
if (!PyArg_ParseTuple(args,"ii:getVertex",&matindex,&vertexindex))
return NULL;
diff --git a/source/gameengine/VideoTexture/PyTypeList.cpp b/source/gameengine/VideoTexture/PyTypeList.cpp
index 6d2676dce09..2d571675dbd 100644
--- a/source/gameengine/VideoTexture/PyTypeList.cpp
+++ b/source/gameengine/VideoTexture/PyTypeList.cpp
@@ -45,7 +45,6 @@ bool PyTypeList::in (PyTypeObject * type)
/// add type to list
void PyTypeList::add (PyTypeObject * type, const char * name)
{
- PyTypeListItem * typeItem;
// if list doesn't exist, create it
if (m_list.get() == NULL)
m_list.reset(new PyTypeListType());