More warning cleanups...

added a casts to:
   blender/blenlib/intern/BLI_memarena.c
   gameengine/Rasterizer/RAS_TexVert.cpp

Removed unused vars from:
   blender/python/api2_2x/vector.c
   gameengine/Ketsji/KX_PyMath.cpp gameengine/Ketsji/KX_Scene.cpp
   gameengine/Physics/Sumo/Fuzzics/src/SM_Object.cpp
   gameengine/Rasterizer/RAS_FramingManager.cpp
   gameengine/Rasterizer/RAS_Polygon.cpp
   gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp

Kent
This commit is contained in:
Kent Mein
2005-01-03 18:05:24 +00:00
parent 8055b5c247
commit 48bc598658
9 changed files with 7 additions and 22 deletions

View File

@@ -55,7 +55,7 @@ MemArena *BLI_memarena_new(int bufsize) {
return ma; return ma;
} }
void BLI_memarena_free(MemArena *ma) { void BLI_memarena_free(MemArena *ma) {
BLI_linklist_free(ma->bufs, MEM_freeN); BLI_linklist_free(ma->bufs, (void(*)(void*)) MEM_freeN);
MEM_freeN(ma); MEM_freeN(ma);
} }

View File

@@ -707,7 +707,6 @@ PyObject *newVectorObject( float *vec, int size )
PyObject *newVectorProxy( float *vec, int size) PyObject *newVectorProxy( float *vec, int size)
{ {
VectorObject *proxy; VectorObject *proxy;
int x;
proxy = PyObject_NEW( VectorObject, &vector_Type ); proxy = PyObject_NEW( VectorObject, &vector_Type );

View File

@@ -53,7 +53,7 @@ bool PyObject_IsMT_Matrix(PyObject *pymat, unsigned int rank)
if (!pymat) if (!pymat)
return false; return false;
unsigned int x, y; unsigned int y;
if (PySequence_Check(pymat)) if (PySequence_Check(pymat))
{ {
unsigned int rows = PySequence_Size(pymat); unsigned int rows = PySequence_Size(pymat);

View File

@@ -997,14 +997,6 @@ void KX_Scene::LogicEndFrame()
KX_GameObject* gameobj = (KX_GameObject*)m_euthanasyobjects->GetValue(i); KX_GameObject* gameobj = (KX_GameObject*)m_euthanasyobjects->GetValue(i);
this->RemoveObject(gameobj); this->RemoveObject(gameobj);
} }
numobj = m_euthanasyobjects->GetCount();
if (numobj != 0)
{
// huh?
int ii=0;
}
// numobj is 0 we hope
} }

View File

@@ -526,7 +526,6 @@ DT_Bool SM_Object::fix(
void *object2, void *object2,
const DT_CollData *coll_data const DT_CollData *coll_data
){ ){
SM_Scene *scene = (SM_Scene *)client_data;
SM_Object *obj1 = (SM_Object *)object1; SM_Object *obj1 = (SM_Object *)object1;
SM_Object *obj2 = (SM_Object *)object2; SM_Object *obj2 = (SM_Object *)object2;

View File

@@ -174,9 +174,6 @@ ComputeFrustum(
RAS_FrameFrustum &frustum RAS_FrameFrustum &frustum
){ ){
const int winx = availableViewport.GetWidth();
const int winy = availableViewport.GetHeight();
RAS_FrameSettings::RAS_FrameType type = settings.FrameType(); RAS_FrameSettings::RAS_FrameType type = settings.FrameType();
const float design_width = float(settings.DesignAspectWidth()); const float design_width = float(settings.DesignAspectWidth());

View File

@@ -139,7 +139,6 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays
bool useObjectColor, bool useObjectColor,
const MT_Vector4& rgbacolor) const MT_Vector4& rgbacolor)
{ {
unsigned char* mypointer=NULL;
static const GLsizei vtxstride = sizeof(RAS_TexVert); static const GLsizei vtxstride = sizeof(RAS_TexVert);
GLenum drawmode; GLenum drawmode;
switch (mode) switch (mode)
@@ -187,7 +186,7 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays
vertexarray = &((*vertexarrays[vt]) [0]); vertexarray = &((*vertexarrays[vt]) [0]);
const KX_IndexArray & indexarray = (*indexarrays[vt]); const KX_IndexArray & indexarray = (*indexarrays[vt]);
numindices = indexarray.size(); numindices = indexarray.size();
int numverts = vertexarrays[vt]->size(); // int numverts = vertexarrays[vt]->size();
if (!numindices) if (!numindices)
continue; continue;

View File

@@ -67,7 +67,6 @@ RAS_Polygon::RAS_Polygon(RAS_MaterialBucket* bucket,
m_numverts(numverts), m_numverts(numverts),
m_edgecode(0) m_edgecode(0)
{ {
int size = sizeof(RAS_Polygon);
m_vertexindexbase.m_vtxarray = vtxarrayindex ;//m_bucket->FindVertexArray(numverts); m_vertexindexbase.m_vtxarray = vtxarrayindex ;//m_bucket->FindVertexArray(numverts);
m_polyFlags.Visible = visible; m_polyFlags.Visible = visible;
} }

View File

@@ -59,10 +59,10 @@ const MT_Point3& RAS_TexVert::xyz()
void RAS_TexVert::SetRGBA(const MT_Vector4& rgba) void RAS_TexVert::SetRGBA(const MT_Vector4& rgba)
{ {
unsigned char *colp = (unsigned char*) &m_rgba; unsigned char *colp = (unsigned char*) &m_rgba;
colp[0] = rgba[0]*255.0; colp[0] = (unsigned char) (rgba[0]*255.0);
colp[1] = rgba[1]*255.0; colp[1] = (unsigned char) (rgba[1]*255.0);
colp[2] = rgba[2]*255.0; colp[2] = (unsigned char) (rgba[2]*255.0);
colp[3] = rgba[3]*255.0; colp[3] = (unsigned char) (rgba[3]*255.0);
} }