minor warning fixes for clang-static-checker
authorCampbell Barton <ideasman42@gmail.com>
Wed, 27 Jul 2011 13:03:56 +0000 (13:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 27 Jul 2011 13:03:56 +0000 (13:03 +0000)
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/customdata.c
source/blender/editors/transform/transform_snap.c

index 3abfa05..662c872 100644 (file)
@@ -1287,6 +1287,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
                                                QUATCOPY((float *)&varray[elementsize*curface*3+offset+elementsize*2], tang);
                                                offset += sizeof(float)*4;
                                        }
+                                       (void)offset;
                                }
                                curface++;
                                if(mface->v4) {
@@ -1327,6 +1328,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
                                                        QUATCOPY((float *)&varray[elementsize*curface*3+offset+elementsize*2], tang);
                                                        offset += sizeof(float)*4;
                                                }
+                                               (void)offset;
                                        }
                                        curface++;
                                        i++;
index 45faba8..8d19322 100644 (file)
@@ -466,7 +466,6 @@ static void layerInterp_mdisps(void **sources, float *UNUSED(weights),
                        MDisps tris[2];
                        int vindex[4] = {0};
 
-                       S = 0;
                        for(i = 0; i < 2; i++)
                                for(y = 0; y < 4; y++)
                                        for(x = 0; x < 4; x++)
index 933d90e..f677e1a 100644 (file)
@@ -1944,9 +1944,9 @@ static void applyGrid(TransInfo *t, float *val, int max_index, float fac[3], Gea
        int i;
        float asp[3] = {1.0f, 1.0f, 1.0f}; // TODO: Remove hard coded limit here (3)
 
-       if(max_index > 3) {
+       if(max_index > 2) {
                printf("applyGrid: invalid index %d, clamping\n", max_index);
-               max_index= 3;
+               max_index= 2;
        }
 
        // Early bailing out if no need to snap