More warning cleanups...
authorKent Mein <mein@cs.umn.edu>
Mon, 3 Jan 2005 18:05:24 +0000 (18:05 +0000)
committerKent Mein <mein@cs.umn.edu>
Mon, 3 Jan 2005 18:05:24 +0000 (18:05 +0000)
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

source/blender/blenlib/intern/BLI_memarena.c
source/blender/python/api2_2x/vector.c
source/gameengine/Ketsji/KX_PyMath.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Physics/Sumo/Fuzzics/src/SM_Object.cpp
source/gameengine/Rasterizer/RAS_FramingManager.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
source/gameengine/Rasterizer/RAS_Polygon.cpp
source/gameengine/Rasterizer/RAS_TexVert.cpp

index 218fdb3c45bd4e025dccc22b4aea4073bb804ccc..39f36c88ff6ceb06af7b4f0073b43adf2841e075 100644 (file)
@@ -55,7 +55,7 @@ MemArena *BLI_memarena_new(int bufsize) {
        return 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);
 }
 
index ba5273527864b0a08a5b17569d6c69cca85dee23..d7b2f8c8f7408f0f62e5f6e69b673b8cc889326b 100644 (file)
@@ -707,7 +707,6 @@ PyObject *newVectorObject( float *vec, int size )
 PyObject *newVectorProxy( float *vec, int size)
 {
        VectorObject *proxy;
-       int x;
 
        proxy = PyObject_NEW( VectorObject, &vector_Type );
 
index 5e300c4dd71ee5b7b8fd7f830d7fb6f412a167f5..6eedc13df9542a6d68a650bb4fce618c38eb63f7 100644 (file)
@@ -53,7 +53,7 @@ bool PyObject_IsMT_Matrix(PyObject *pymat, unsigned int rank)
        if (!pymat)
                return false;
                
-       unsigned int x, y;
+       unsigned int y;
        if (PySequence_Check(pymat))
        {
                unsigned int rows = PySequence_Size(pymat);
index 09e4ae7bbb17f98d42206fbadc8eb002153694d5..36e1596ee85d1cb01980f4c53794bceeb7622a11 100644 (file)
@@ -997,14 +997,6 @@ void KX_Scene::LogicEndFrame()
                KX_GameObject* gameobj = (KX_GameObject*)m_euthanasyobjects->GetValue(i);
                this->RemoveObject(gameobj);
        }
-       
-       numobj = m_euthanasyobjects->GetCount();
-       if (numobj != 0)
-       {
-               // huh?
-               int ii=0;
-       }
-       // numobj is 0 we hope
 }
 
 
index 26687663006f69a49b6005b5a688475c69f94048..ab1db7c794191d8236fce3f257eaf12380b1e852 100644 (file)
@@ -526,7 +526,6 @@ DT_Bool SM_Object::fix(
        void *object2,
        const DT_CollData *coll_data
 ){
-       SM_Scene  *scene = (SM_Scene *)client_data; 
        SM_Object *obj1  = (SM_Object *)object1;  
        SM_Object *obj2  = (SM_Object *)object2;  
        
index d9b3708f6aa3695a9ad47eb9be1d9065452f713a..131893bd79f53c9fc3734a7ef701b08876aa3561 100644 (file)
@@ -174,9 +174,6 @@ ComputeFrustum(
        RAS_FrameFrustum &frustum
 ){
 
-       const int winx = availableViewport.GetWidth();
-       const int winy = availableViewport.GetHeight();
-
        RAS_FrameSettings::RAS_FrameType type = settings.FrameType();
 
        const float design_width = float(settings.DesignAspectWidth());
index f01d76bd8d2888813b89fb5f74e03c54f151f788..77beed5ead12aabdc3b2711541bd254738d7a528 100644 (file)
@@ -139,7 +139,6 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays
                                                        bool useObjectColor,
                                                        const MT_Vector4& rgbacolor)
 {
-       unsigned char* mypointer=NULL;
        static const GLsizei vtxstride = sizeof(RAS_TexVert);
        GLenum drawmode;
        switch (mode)
@@ -187,7 +186,7 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays
                vertexarray = &((*vertexarrays[vt]) [0]);
                const KX_IndexArray & indexarray = (*indexarrays[vt]);
                numindices = indexarray.size();
-               int numverts = vertexarrays[vt]->size();
+               // int numverts = vertexarrays[vt]->size();
 
                if (!numindices)
                        continue;
index 10b5c9ff51c48779bbfb515e898df3697aaecfdc..bfd87d4e416cc5de2c2b3b1cf37ed12297449a7d 100644 (file)
@@ -67,7 +67,6 @@ RAS_Polygon::RAS_Polygon(RAS_MaterialBucket* bucket,
                m_numverts(numverts),
                m_edgecode(0)
 {
-       int size = sizeof(RAS_Polygon);
        m_vertexindexbase.m_vtxarray = vtxarrayindex ;//m_bucket->FindVertexArray(numverts);
        m_polyFlags.Visible = visible;
 }
index 5dae717cd8e99c7497906e155e8924ad3e98a78c..c68806d500c218a00c7d06dab1e0eca045700f96 100644 (file)
@@ -59,10 +59,10 @@ const MT_Point3& RAS_TexVert::xyz()
 void RAS_TexVert::SetRGBA(const MT_Vector4& rgba)
 {
        unsigned char *colp = (unsigned char*) &m_rgba;
-       colp[0] = rgba[0]*255.0;
-       colp[1] = rgba[1]*255.0;
-       colp[2] = rgba[2]*255.0;
-       colp[3] = rgba[3]*255.0;
+       colp[0] = (unsigned char) (rgba[0]*255.0);
+       colp[1] = (unsigned char) (rgba[1]*255.0);
+       colp[2] = (unsigned char) (rgba[2]*255.0);
+       colp[3] = (unsigned char) (rgba[3]*255.0);
 }