Clean-up for various gcc warnings under linux.
authorKen Hughes <khughes@pacific.edu>
Sun, 3 Feb 2008 01:33:35 +0000 (01:33 +0000)
committerKen Hughes <khughes@pacific.edu>
Sun, 3 Feb 2008 01:33:35 +0000 (01:33 +0000)
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp
extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp
source/blender/blenloader/intern/writefile.c
source/blender/imbuf/intern/filter.c
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/src/buttons_object.c
source/blender/src/editobject.c

index 614ec977793f2d1511de8d6afe44a70016321c35..6941030b15f9a6875c8148e4713e7fec19b59073 100644 (file)
@@ -202,4 +202,4 @@ void        btConvexTriangleMeshShape::setLocalScaling(const btVector3& scaling)
 const btVector3& btConvexTriangleMeshShape::getLocalScaling() const
 {
        return m_stridingMesh->getScaling();
-}
\ No newline at end of file
+}
index 44438a244551f7fe9da823ba354ffa37d9a04636..5817f7b1e6dbba1fc745504a60801cc00b1cd9ad 100644 (file)
@@ -702,7 +702,6 @@ void        btOptimizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallb
        
        int curIndex = startNodeIndex;
        int walkIterations = 0;
-       int subTreeSize = endNodeIndex - startNodeIndex;
 
        const btQuantizedBvhNode* rootNode = &m_quantizedContiguousNodes[startNodeIndex];
        int escapeIndex;
index 12a33d7851e2f663da862315aaca239ea7805d06..2289621e8e35cabac28a1f11431e456d7678487f 100644 (file)
@@ -205,7 +205,6 @@ void        btConeTwistConstraint::solveConstraint(btScalar timeStep)
        btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin();
 
        btScalar tau = btScalar(0.3);
-       btScalar damping = btScalar(1.);
 
        //linear part
        if (!m_angularOnly)
index 02cf44d0cfabfe3114bee88500698b8fa71d9d67..9ed3579d89c1e5f33555fb7c4d9f333246543492 100644 (file)
@@ -342,4 +342,4 @@ void btRigidBody::removeConstraintRef(btTypedConstraint* c)
 {
        m_constraintRefs.remove(c);
        m_checkCollideWith = m_constraintRefs.size() > 0;
-}
\ No newline at end of file
+}
index 6ff39d471dfe53c4d44cc601ba69b016d8840fea..afd12d96860c3f9f1fa4f7f83af84781474138e0 100644 (file)
@@ -846,8 +846,8 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
                } 
                else if (md->type==eModifierType_Collision) {
                        
-                       CollisionModifierData *collmd = (CollisionModifierData*) md;
                        /*
+                       CollisionModifierData *collmd = (CollisionModifierData*) md;
                        // TODO: CollisionModifier should use pointcache 
                        // + have proper reset events before enabling this
                        writestruct(wd, DATA, "MVert", collmd->numverts, collmd->x);
index 172342c913ce7a87feb7a47119a001401356e2f5..6c82a1e24a7c830d5ae71c9bf88aae013866b5bc 100644 (file)
@@ -256,7 +256,6 @@ void IMB_filter_extend(struct ImBuf *ibuf)
                float *temprect;
                float *row1f, *row2f, *row3f;
                float *fp;
-               int pixlen = 4;
                temprect= MEM_dupallocN(ibuf->rect_float);
                
                for(y=1; y<=ibuf->y; y++) {
index 0c92cc047a3ae446d008d36155e9708df5d2ae26..c5f5a33a5d11e16cee11f6ced257bf5527aecb5d 100644 (file)
@@ -620,7 +620,6 @@ void IMB_exr_multilayer_convert(void *handle, void *base,
 void IMB_exr_close(void *handle)
 {
        ExrHandle *data= (ExrHandle *)handle;
-       ExrChannel *echan;
        ExrLayer *lay;
        ExrPass *pass;
        
@@ -783,28 +782,28 @@ static ExrHandle *imb_exr_begin_read_mem(InputFile *file, int width, int height)
                                        /* we can have RGB(A), XYZ(W), UVA */
                                        if(pass->totchan==3 || pass->totchan==4) {
                                                if(pass->chan[0]->chan_id=='B' || pass->chan[1]->chan_id=='B' ||  pass->chan[2]->chan_id=='B') {
-                                                       lookup['R']= 0;
-                                                       lookup['G']= 1;
-                                                       lookup['B']= 2;
-                                                       lookup['A']= 3;
+                                                       lookup[(unsigned int)'R']= 0;
+                                                       lookup[(unsigned int)'G']= 1;
+                                                       lookup[(unsigned int)'B']= 2;
+                                                       lookup[(unsigned int)'A']= 3;
                                                }
                                                else if(pass->chan[0]->chan_id=='Y' || pass->chan[1]->chan_id=='Y' ||  pass->chan[2]->chan_id=='Y') {
-                                                       lookup['X']= 0;
-                                                       lookup['Y']= 1;
-                                                       lookup['Z']= 2;
-                                                       lookup['W']= 3;
+                                                       lookup[(unsigned int)'X']= 0;
+                                                       lookup[(unsigned int)'Y']= 1;
+                                                       lookup[(unsigned int)'Z']= 2;
+                                                       lookup[(unsigned int)'W']= 3;
                                                }
                                                else {
-                                                       lookup['U']= 0;
-                                                       lookup['V']= 1;
-                                                       lookup['A']= 2;
+                                                       lookup[(unsigned int)'U']= 0;
+                                                       lookup[(unsigned int)'V']= 1;
+                                                       lookup[(unsigned int)'A']= 2;
                                                }
                                                for(a=0; a<pass->totchan; a++) {
                                                        echan= pass->chan[a];
-                                                       echan->rect= pass->rect + lookup[echan->chan_id];
+                                                       echan->rect= pass->rect + lookup[(unsigned int)echan->chan_id];
                                                        echan->xstride= pass->totchan;
                                                        echan->ystride= width*pass->totchan;
-                                                       pass->chan_id[ lookup[echan->chan_id] ]= echan->chan_id;
+                                                       pass->chan_id[ (unsigned int)lookup[(unsigned int)echan->chan_id] ]= echan->chan_id;
                                                }
                                        }
                                        else { /* unknown */
@@ -836,6 +835,7 @@ typedef struct RGBA
 } RGBA;
 
 
+#if 0
 static void exr_print_filecontents(InputFile *file)
 {
        const ChannelList &channels = file->header().channels();
@@ -846,6 +846,7 @@ static void exr_print_filecontents(InputFile *file)
                printf("OpenEXR-load: Found channel %s of type %d\n", i.name(), channel.type);
        }
 }
+#endif
 
 static int exr_has_zbuffer(InputFile *file)
 {
@@ -853,7 +854,6 @@ static int exr_has_zbuffer(InputFile *file)
        
        for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i)
        {
-               const Channel &channel = i.channel();
                if(strcmp("Z", i.name())==0)
                        return 1;
        }
index 268e6a4889890e83a60255f76e3c00e4ba902cbe..a6470faa987ac3fae68d69928e5233532c303f75 100644 (file)
@@ -2222,7 +2222,7 @@ void do_object_panels(unsigned short event)
        case B_DUPLI_VERTS:
                ob->transflag &= ~(OB_DUPLIFRAMES|OB_DUPLIFACES|OB_DUPLIGROUP);
                DAG_scene_sort(G.scene);
-               DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
+               DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
                allqueue(REDRAWVIEW3D, 0);
                allqueue(REDRAWBUTSOBJECT, 0);
                break;
@@ -3572,7 +3572,7 @@ static void object_softbodies_collision(Object *ob)
        SoftBody *sb=ob->soft;
        uiBlock *block;
        static int val;
-       short *softflag=&ob->softflag, psys_cur=0, adaptive_mode=0;
+       short *softflag=&ob->softflag, psys_cur=0;
        int ob_has_hair=psys_ob_has_hair(ob);
     if(!_can_softbodies_at_all(ob)) return;
        /*bah that is ugly! creating missing data members in UI code*/
index 269c1db4649e770ce863b7b6bb725fab44590259..6945573af715ea05405d9094a5b23a06b6060dbd 100644 (file)
@@ -5601,9 +5601,6 @@ void texspace_edit(void)
 
 void mirrormenu(void)
 {
-       short mode = 0;
-
-
        if(G.f & G_PARTICLEEDIT) {
                PE_mirror_x(0);
        }