remove unused code, comment some that may be useful (maintainers can remove).
authorCampbell Barton <ideasman42@gmail.com>
Mon, 23 May 2011 15:23:31 +0000 (15:23 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 23 May 2011 15:23:31 +0000 (15:23 +0000)
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/screen/screen_edit.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/intern/targa.c
source/blender/makesdna/intern/makesdna.c

index f8a85c8ba7672a1891abeeb8b4118c241742dd90..527692348e76add5f22d9d6f0bebdebb9b54af17 100644 (file)
@@ -1687,13 +1687,13 @@ static void dfs_range_query(RangeQueryData *data, BVHNode *node)
 {
        if(node->totnode == 0)
        {
-
+#if 0  /*UNUSED*/
                //Calculate the node min-coords (if the node was a point then this is the point coordinates)
                float co[3];
                co[0] = node->bv[0];
                co[1] = node->bv[2];
                co[2] = node->bv[4];
-
+#endif
        }
        else
        {
index 95a43a998d36f5183f3eed9f92f420c33cc961e2..f7b79b35cbce8a569262d912536022dbcb1afbd7 100644 (file)
@@ -1437,7 +1437,7 @@ int BLI_pbvh_node_planes_contain_AABB(PBVHNode *node, void *data)
 {
        float (*planes)[4] = data;
        int i, axis;
-       float vmin[3], vmax[3], bb_min[3], bb_max[3];
+       float vmin[3] /*, vmax[3]*/, bb_min[3], bb_max[3];
 
        BLI_pbvh_node_get_BB(node, bb_min, bb_max);
 
@@ -1445,11 +1445,11 @@ int BLI_pbvh_node_planes_contain_AABB(PBVHNode *node, void *data)
                for(axis = 0; axis < 3; ++axis) {
                        if(planes[i][axis] > 0) { 
                                vmin[axis] = bb_min[axis];
-                               vmax[axis] = bb_max[axis];
+                               /*vmax[axis] = bb_max[axis];*/ /*UNUSED*/
                        }
                        else {
                                vmin[axis] = bb_max[axis];
-                               vmax[axis] = bb_min[axis];
+                               /*vmax[axis] = bb_min[axis];*/ /*UNUSED*/
                        }
                }
                
index 93518e993d59191fc3d6be31d1d0e093a6736602..d76274deb6eafbe59ef9df441bdd115de42066f5 100644 (file)
@@ -2115,7 +2115,7 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open))
        }
        
        {
-               int has_old_groups=0;
+               /*int has_old_groups=0;*/ /*UNUSED*/
                /* XXX this should actually be part of do_versions, but since we need
                 * finished library linking, it is not possible there. Instead in do_versions
                 * we have set the NTREE_DO_VERSIONS flag, so at this point we can do the
@@ -2125,7 +2125,7 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open))
                        if (ntree->flag & NTREE_DO_VERSIONS) {
                                /* this adds copies and links from all unlinked internal sockets to group inputs/outputs. */
                                nodeGroupExposeAllSockets(ntree);
-                               has_old_groups = 1;
+                               /*has_old_groups = 1;*/ /*UNUSED*/
                        }
                }
                /* now verify all types in material trees, groups are set OK now */
index c4108e0ce33fb0553134aaca515feeee99d53fa2..00e11d8b1a43b0260c6d245622487f18213287b1 100644 (file)
@@ -372,7 +372,7 @@ static void add_bezt_to_keyblocks_list(DLRBT_Tree *blocks, DLRBT_Tree *beztTree,
                blocks->root= (DLRBT_Node *)new_ab;
        }
        else {
-               ActKeyBlock *ab, *abp=NULL, *abn=NULL;
+               ActKeyBlock *ab, *abn=NULL;
                
                /* try to find a keyblock that starts on the previous beztriple, and add a new one if none start there
                 * Note: we can't search from end to try to optimise this as it causes errors there's
@@ -382,7 +382,7 @@ static void add_bezt_to_keyblocks_list(DLRBT_Tree *blocks, DLRBT_Tree *beztTree,
                //              A|--------------|A ______________ B|--------------|B
                //              A|------------------------------------------------|A
                //              A|----|A|---|A|-----------------------------------|A
-               for (ab= blocks->root; ab; abp= ab, ab= abn) {
+               for (ab= blocks->root; ab; ab= abn) {
                        /* check if this is a match, or whether we go left or right */
                        if (ab->start == prev->vec[1][0]) {
                                /* set selection status and 'touched' status */
index fa458f4096d81afe29b985a27c738b2f3233223c..653c393a0115b0999a9909d639ef78a7b45f380e 100644 (file)
@@ -3460,7 +3460,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
        ParticleBrushData *brush= &pset->brush[pset->brushtype];
        ARegion *ar= CTX_wm_region(C);
        float vec[3], mousef[2];
-       int mval[2], mvalo[2];
+       int mval[2];
        int flip, mouse[2], dx, dy, removed= 0, added=0, selected= 0;
        int lock_root = pset->flag & PE_LOCK_FIRST;
 
@@ -3483,8 +3483,6 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
        mval[0]= mouse[0];
        mval[1]= mouse[1];
 
-       mvalo[0]= bedit->lastmouse[0];
-       mvalo[1]= bedit->lastmouse[1];
 
        /* disable locking temporatily for disconnected hair */
        if(edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
index e942cfc8b1fcd38702e78a1749e9eeb310e0212d..9bc2b1a402c08699b63280a37e6da30a3bc70745 100644 (file)
@@ -1595,12 +1595,12 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
 
        if(sa && sa->full) {
                ScrArea *old;
-               short fulltype;
+               /*short fulltype;*/ /*UNUSED*/
 
                sc= sa->full;           /* the old screen to restore */
                oldscreen= win->screen; /* the one disappearing */
 
-               fulltype = sc->full;
+               /*fulltype = sc->full;*/
                sc->full= 0;
 
                /* removed: SCREENAUTOPLAY exception here */
index 1bf70fbd38b234ee5507756bea136583f7b690d8..e936f35574da8b160c2a6874c27d1d00f5a9a92d 100644 (file)
@@ -900,7 +900,7 @@ static void do_material_tex(GPUShadeInput *shi)
        GPUNodeLink *texco_norm, *texco_orco, *texco_object;
        GPUNodeLink *texco_global, *texco_uv = NULL;
        GPUNodeLink *newnor, *orn;
-       char *lastuvname = NULL;
+       /*char *lastuvname = NULL;*/ /*UNUSED*/
        float one = 1.0f, norfac, ofs[3];
        int tex_nr, rgbnor, talpha;
        int init_done = 0, iBumpSpacePrev;
@@ -947,7 +947,7 @@ static void do_material_tex(GPUShadeInput *shi)
                        else if(mtex->texco==TEXCO_UV) {
                                if(1) { //!(texco_uv && strcmp(mtex->uvname, lastuvname) == 0)) {
                                        GPU_link(mat, "texco_uv", GPU_attribute(CD_MTFACE, mtex->uvname), &texco_uv);
-                                       lastuvname = mtex->uvname;
+                                       /*lastuvname = mtex->uvname;*/ /*UNUSED*/
                                }
                                texco= texco_uv;
                        }
index f334409133fc4ed76c91070a03f54951656ac109..5d9f350be486c7b97f681865f54cd37e8ee58891 100644 (file)
@@ -532,7 +532,7 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
        TARGA tga;
        struct ImBuf * ibuf;
        int col, count, size;
-       unsigned int *rect, *cmap= NULL, mincol= 0, maxcol= 0;
+       unsigned int *rect, *cmap= NULL /*, mincol= 0*/, maxcol= 0;
        uchar * cp = (uchar *) &col;
        
        if (checktarga(&tga,mem) == 0) return(NULL);
@@ -550,7 +550,7 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
        
        if (tga.mapsize){
                /* load color map */
-               mincol = tga.maporig;
+               /*mincol = tga.maporig;*/ /*UNUSED*/
                maxcol = tga.mapsize;
                cmap = MEM_callocN(sizeof(unsigned int)*maxcol, "targa cmap");
 
index 07ee084f9762bed711c95244bb1d83a8b7ed98c6..8b841b67e548ea2c7d9983e023bee59a8c18678b 100644 (file)
@@ -855,12 +855,13 @@ void dna_write(FILE *file, void *pntr, int size)
 
 void printStructLenghts(void)
 {
-       int a, unknown= nr_structs, lastunknown, structtype;
+       int a, unknown= nr_structs, structtype;
+       /*int lastunknown;*/ /*UNUSED*/
        short *structpoin;
        printf("\n\n*** All detected structs:\n");
 
        while(unknown) {
-               lastunknown= unknown;
+               /*lastunknown= unknown;*/ /*UNUSED*/
                unknown= 0;
                
                /* check all structs... */