tag & comment unused vars with /* UNUSED */
authorCampbell Barton <ideasman42@gmail.com>
Tue, 20 Sep 2011 08:48:48 +0000 (08:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 20 Sep 2011 08:48:48 +0000 (08:48 +0000)
35 files changed:
intern/smoke/CMakeLists.txt
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/node.c
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_nla/nla_select.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_state.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_manipulator.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/nodes/composite/nodes/node_composite_colorSpill.c
source/blender/nodes/composite/nodes/node_composite_diffMatte.c
source/blender/nodes/intern/node_common.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/intern/wm_gesture.c

index 228ff6e..6e1d3eb 100644 (file)
@@ -83,8 +83,13 @@ set(SRC
        intern/tnt/tnt_version.h
 )
 
+# quiet -Wundef
+add_definitions(-DDDF_DEBUG=0)
+
 if(WITH_OPENMP)
        add_definitions(-DPARALLEL=1)
+else()
+       add_definitions(-DPARALLEL=0)
 endif()
 
 if(WITH_FFTW3)
index 3d05411..0b3bb4c 100644 (file)
@@ -989,13 +989,13 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
        DMVertexAttribs attribs= {{{0}}};
        GPUVertexAttribs gattribs;
        /* int tfoffset; */ /* UNUSED */
-       int i, b, matnr, new_matnr, dodraw, layer;
+       int i, b, matnr, new_matnr, dodraw /* , layer */ /* UNUSED */;
 
        dodraw = 0;
        matnr = -1;
 
-       layer = CustomData_get_layer_index(&em->fdata, CD_MTFACE);
-       /* tfoffset = (layer == -1)? -1: em->fdata.layers[layer].offset; */
+       /* layer = CustomData_get_layer_index(&em->fdata, CD_MTFACE); */ /* UNUSED */
+       /* tfoffset = (layer == -1)? -1: em->fdata.layers[layer].offset; */ /* UNUSED */
 
        /* always use smooth shading even for flat faces, else vertex colors wont interpolate */
        glShadeModel(GL_SMOOTH);
index b690c9b..5d01db8 100644 (file)
@@ -1557,7 +1557,7 @@ static NlaEvalChannel *nlaevalchan_verify (PointerRNA *ptr, ListBase *channels,
        PropertyRNA *prop;
        PointerRNA new_ptr;
        char *path = NULL;
-       short free_path=0;
+       /* short free_path=0; */
        
        /* sanity checks */
        if (channels == NULL)
@@ -1565,7 +1565,7 @@ static NlaEvalChannel *nlaevalchan_verify (PointerRNA *ptr, ListBase *channels,
        
        /* get RNA pointer+property info from F-Curve for more convenient handling */
                /* get path, remapped as appropriate to work in its new environment */
-       free_path= animsys_remap_path(strip->remap, fcu->rna_path, &path);
+       /* free_path= */ /* UNUSED */ animsys_remap_path(strip->remap, fcu->rna_path, &path);
        
                /* a valid property must be available, and it must be animateable */
        if (RNA_path_resolve(ptr, path, &new_ptr, &prop) == 0) {
index 2b6261b..218b83f 100644 (file)
@@ -500,7 +500,7 @@ static int read_undosave(bContext *C, UndoElem *uel)
 void BKE_write_undo(bContext *C, const char *name)
 {
        uintptr_t maxmem, totmem, memused;
-       int nr, success;
+       int nr /*, success */ /* UNUSED */;
        UndoElem *uel;
        
        if( (U.uiflag & USER_GLOBALUNDO)==0) return;
@@ -552,7 +552,7 @@ void BKE_write_undo(bContext *C, const char *name)
                BLI_snprintf(numstr, sizeof(numstr), "%d.blend", counter);
                BLI_make_file_string("/", filepath, btempdir, numstr);
        
-               success= BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL);
+               /* success= */ /* UNUSED */ BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL);
                
                BLI_strncpy(curundo->str, filepath, sizeof(curundo->str));
        }
@@ -562,7 +562,7 @@ void BKE_write_undo(bContext *C, const char *name)
                if(curundo->prev) prevfile= &(curundo->prev->memfile);
                
                memused= MEM_get_memory_in_use();
-               success= BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags);
+               /* success= */ /* UNUSED */ BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags);
                curundo->undosize= MEM_get_memory_in_use() - memused;
        }
 
index e955a47..e193933 100644 (file)
@@ -1139,7 +1139,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
                GPUBuffer *buffer = NULL;
                char *varray = NULL;
                int numdata = 0, elementsize = 0, offset;
-               int start = 0, numfaces = 0, prevdraw = 0, curface = 0;
+               int start = 0, numfaces = 0 /* , prevdraw = 0 */ /* UNUSED */, curface = 0;
                int i;
 
                MFace *mf = mface;
@@ -1183,7 +1183,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
                                        }
                                        numdata = 0;
                                        start = curface;
-                                       prevdraw = dodraw;
+                                       /* prevdraw = dodraw; */ /* UNUSED */
                                        dodraw = setMaterial(matnr = new_matnr, &gattribs);
                                        if(dodraw) {
                                                DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
@@ -1231,7 +1231,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
                                                else {
                                                        /* if the buffer was set, dont use it again.
                                                         * prevdraw was assumed true but didnt run so set to false - [#21036] */
-                                                       prevdraw= 0;
+                                                       /* prevdraw= 0; */ /* UNUSED */
                                                        buffer= NULL;
                                                }
                                        }
index 89fd3ff..524a63a 100644 (file)
@@ -295,12 +295,12 @@ int nodeFindNode(bNodeTree *ntree, bNodeSocket *sock, bNode **nodep, int *sockin
 static void node_add_sockets_from_type(bNodeTree *ntree, bNode *node, bNodeType *ntype)
 {
        bNodeSocketTemplate *sockdef;
-       bNodeSocket *sock;
+       /* bNodeSocket *sock; */ /* UNUSED */
 
        if(ntype->inputs) {
                sockdef= ntype->inputs;
                while(sockdef->type != -1) {
-                       sock = node_add_input_from_template(ntree, node, sockdef);
+                       /* sock = */ node_add_input_from_template(ntree, node, sockdef);
                        
                        sockdef++;
                }
@@ -308,7 +308,7 @@ static void node_add_sockets_from_type(bNodeTree *ntree, bNode *node, bNodeType
        if(ntype->outputs) {
                sockdef= ntype->outputs;
                while(sockdef->type != -1) {
-                       sock = node_add_output_from_template(ntree, node, sockdef);
+                       /* sock = */ node_add_output_from_template(ntree, node, sockdef);
                        
                        sockdef++;
                }
@@ -620,7 +620,7 @@ bNodeTree *ntreeAddTree(const char *name, int type, int nodetype)
 bNodeTree *ntreeCopyTree(bNodeTree *ntree)
 {
        bNodeTree *newtree;
-       bNode *node, *nnode, *last;
+       bNode *node /*, *nnode */ /* UNUSED */, *last;
        bNodeLink *link;
        bNodeSocket *gsock, *oldgsock;
        
@@ -647,7 +647,7 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree)
        last = ntree->nodes.last;
        for(node= ntree->nodes.first; node; node= node->next) {
                node->new_node= NULL;
-               nnode= nodeCopyNode(newtree, node);     /* sets node->new */
+               /* nnode= */ nodeCopyNode(newtree, node);       /* sets node->new */
                
                /* make sure we don't copy new nodes again! */
                if (node==last)
index 43bf2f5..9242ddc 100644 (file)
@@ -420,8 +420,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
        
        /* check if we should restore aspect ratio (if view size changed) */
        if (v2d->keepzoom & V2D_KEEPASPECT) {
-               short do_x=0, do_y=0, do_cur, do_win;
-               float curRatio, winRatio;
+               short do_x=0, do_y=0, do_cur /* , do_win */ /* UNUSED */;
+               float /* curRatio, */ /* UNUSED */ winRatio;
                
                /* when a window edge changes, the aspect ratio can't be used to
                 * find which is the best new 'cur' rect. thats why it stores 'old' 
@@ -429,7 +429,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                if (winx != v2d->oldwinx) do_x= 1;
                if (winy != v2d->oldwiny) do_y= 1;
                
-               curRatio= height / width;
+               /* curRatio= height / width; */ /* UNUSED */
                winRatio= winy / winx;
                
                /* both sizes change (area/region maximised)  */
@@ -443,7 +443,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                        else do_x= 1;
                }
                do_cur= do_x;
-               do_win= do_y;
+               /* do_win= do_y; */ /* UNUSED */
                
                if (do_cur) {
                        if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) {
index 5411f01..ef52d9b 100644 (file)
@@ -238,7 +238,6 @@ int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me)
 int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mesh *me, const char *name, int active_set)
 {
        EditMesh *em;
-       MCol *mcol;
        int layernum;
 
        if(me->edit_mesh) {
@@ -261,8 +260,6 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
                if(layernum >= MAX_MCOL)
                        return 0;
 
-               mcol= me->mcol;
-
                if(me->mcol)
                        CustomData_add_layer_named(&me->fdata, CD_MCOL, CD_DUPLICATE, me->mcol, me->totface, name);
                else
index 32594e7..dc81fb1 100644 (file)
@@ -1139,7 +1139,7 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
 static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        bAnimContext ac;
-       ARegion *ar;
+       /* ARegion *ar; */ /* UNUSED */
        short selectmode, column;
        
        /* get editor data */
@@ -1147,7 +1147,7 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
                return OPERATOR_CANCELLED;
                
        /* get useful pointers from animation context data */
-       ar= ac.ar;
+       /* ar= ac.ar; */ /* UNUSED */
 
        /* select mode is either replace (deselect all, then add) or add/extend */
        if (RNA_boolean_get(op->ptr, "extend"))
index 5ea7f35..05d38a6 100644 (file)
@@ -606,8 +606,8 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2],
 static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        bAnimContext ac;
-       Scene *scene;
-       ARegion *ar;
+       /* Scene *scene; */ /* UNUSED */
+       /* ARegion *ar; */ /* UNUSED */
        // View2D *v2d; /*UNUSED*/
        short selectmode;
 
@@ -616,8 +616,8 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
                return OPERATOR_CANCELLED;
                
        /* get useful pointers from animation context data */
-       scene= ac.scene;
-       ar= ac.ar;
+       /* scene= ac.scene; */ /* UNUSED */
+       /* ar= ac.ar; */ /* UNUSED */
        // v2d= &ar->v2d;
 
        /* select mode is either replace (deselect all, then add) or add/extend */
index cd521f7..f34cef4 100644 (file)
@@ -179,6 +179,7 @@ static void node_socket_button_color(const bContext *C, uiBlock *block,
 
 /* ****************** BASE DRAW FUNCTIONS FOR NEW OPERATOR NODES ***************** */
 
+#if 0 /* UNUSED */
 static void node_draw_socket_new(bNodeSocket *sock, float size)
 {
        float x=sock->locx, y=sock->locy;
@@ -216,6 +217,7 @@ static void node_draw_socket_new(bNodeSocket *sock, float size)
        glDisable( GL_LINE_SMOOTH );
        glDisable(GL_BLEND);
 }
+#endif
 
 /* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
 
@@ -894,14 +896,14 @@ static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
        Main *bmain= CTX_data_main(C);
        bNodeTree *ntree= ntree_v;
        bNode *node= node_v;
-       ID *oldid;
+       /* ID *oldid; */ /* UNUSED */
        
        if(node->menunr<1) return;
        
        if(node->id) {
                node->id->us--;
        }
-       oldid= node->id;
+       /* oldid= node->id; */ /* UNUSED */
        node->id= BLI_findlink(&bmain->text, node->menunr-1);
        id_us_plus(node->id);
        BLI_strncpy(node->name, node->id->name+2, sizeof(node->name));
index a966caa..7cb8351 100644 (file)
@@ -757,6 +757,8 @@ void ED_node_update_hierarchy(bContext *UNUSED(C), bNodeTree *ntree)
 
 /* ***************** generic operator functions for nodes ***************** */
 
+#if 0 /* UNUSED */
+
 static int edit_node_poll(bContext *C)
 {
        return ED_operator_node_active(C);
@@ -815,6 +817,7 @@ static void edit_node_properties_get(wmOperator *op, bNodeTree *ntree, bNode **r
        if (rin_out)
                *rin_out = in_out;
 }
+#endif
 
 /* ***************** Edit Group operator ************* */
 
@@ -902,7 +905,7 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op)
        char name[32]= "";
        int type= SOCK_FLOAT;
        bNodeTree *ngroup= snode->edittree;
-       bNodeSocket *sock;
+       /* bNodeSocket *sock; */ /* UNUSED */
        
        ED_preview_kill_jobs(C);
        
@@ -918,7 +921,7 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        
        /* using placeholder subtype first */
-       sock = node_group_add_socket(ngroup, name, type, in_out);
+       /* sock = */ /* UNUSED */ node_group_add_socket(ngroup, name, type, in_out);
        
        ntreeUpdateTree(ngroup);
        
index ca9ecf2..e2b0b9c 100644 (file)
@@ -109,7 +109,7 @@ static int node_select_exec(bContext *C, wmOperator *op)
        ARegion *ar= CTX_wm_region(C);
        int mval[2];
        short extend;
-       bNode *node= NULL;
+       /* bNode *node= NULL; */ /* UNUSED */
        
        /* get settings from RNA properties for operator */
        mval[0] = RNA_int_get(op->ptr, "mouse_x");
@@ -118,7 +118,7 @@ static int node_select_exec(bContext *C, wmOperator *op)
        extend = RNA_boolean_get(op->ptr, "extend");
        
        /* perform the select */
-       node= node_mouse_select(bmain, snode, ar, mval, extend);
+       /* node= */ /* UNUSED*/ node_mouse_select(bmain, snode, ar, mval, extend);
        
        /* send notifiers */
        WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
index c4567be..13a5f3c 100644 (file)
@@ -214,12 +214,11 @@ void NODE_OT_visibility_toggle(wmOperatorType *ot)
 static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNode* snode)
 {
        bNode *node;
-       rctf *cur, *tot;
+       rctf *cur;
        float oldwidth, oldheight, width, height;
        int first= 1;
        
        cur= &ar->v2d.cur;
-       tot= &ar->v2d.tot;
        
        oldwidth= cur->xmax - cur->xmin;
        oldheight= cur->ymax - cur->ymin;
index 68b2d3d..6bfe370 100644 (file)
@@ -969,7 +969,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
        ListBase hierarchy = {NULL, NULL};
        LinkData *ld;
        TreeElement *tem, *temnext, *temsub;
-       TreeStoreElem *tse, *tsenext;
+       TreeStoreElem *tse /* , *tsenext */ /* UNUSED */;
        PointerRNA *ptr, *nextptr;
        PropertyRNA *prop;
        char *newpath=NULL;
@@ -1018,7 +1018,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
                                        char buf[128], *name;
                                        
                                        temnext= (TreeElement*)(ld->next->data);
-                                       tsenext= TREESTORE(temnext);
+                                       /* tsenext= TREESTORE(temnext); */ /* UNUSED */
                                        
                                        nextptr= &temnext->rnaptr;
                                        name= RNA_struct_name_get_alloc(nextptr, buf, sizeof(buf));
index 0a1f7a3..9fe0ed0 100644 (file)
@@ -1151,7 +1151,7 @@ static int need_add_seq_dup(Sequence *seq)
 
 static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *te, short index)
 {
-       TreeElement *ch;
+       /* TreeElement *ch; */ /* UNUSED */
        Sequence *p;
 
        p= seq;
@@ -1162,7 +1162,7 @@ static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *t
                }
 
                if(!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
-                       ch= outliner_add_element(soops, &te->subtree, (void*)p, te, TSE_SEQUENCE, index);
+                       /* ch= */ /* UNUSED */ outliner_add_element(soops, &te->subtree, (void*)p, te, TSE_SEQUENCE, index);
                p= p->next;
        }
 }
index da76918..bd93a12 100644 (file)
@@ -1483,9 +1483,13 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
                sort_seq(scene);
        }
 
-       WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
-       
-       return OPERATOR_FINISHED;
+       if(changed) {
+               WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
+               return OPERATOR_FINISHED;
+       }
+       else {
+               return OPERATOR_CANCELLED;
+       }
 }
 
 
index 3d49bc7..685b15a 100644 (file)
@@ -1291,7 +1291,7 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
        TextLine *tmp;
        char *docs, buf[DOC_WIDTH+1], *p;
        int i, br, lines;
-       int boxw, boxh, l, x, y, top;
+       int boxw, boxh, l, x, y /* , top */ /* UNUSED */;
        
        if(!st || !st->text) return;
        if(!texttool_text_is_active(st->text)) return;
@@ -1314,7 +1314,7 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
                x += SUGG_LIST_WIDTH*st->cwidth + 50;
        }
 
-       top= y= ar->winy - st->lheight*l - 2;
+       /* top= */ /* UNUSED */ y= ar->winy - st->lheight*l - 2;
        boxw= DOC_WIDTH*st->cwidth + 20;
        boxh= (DOC_HEIGHT+1)*st->lheight;
 
index e738d5a..44d68de 100644 (file)
@@ -4057,7 +4057,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
 
        if(draw_as==PART_DRAW_PATH){
                ParticleCacheKey **cache, *path;
-               float *cd2=NULL,*cdata2=NULL;
+               float /* *cd2=NULL, */ /* UNUSED */ *cdata2=NULL;
 
                /* setup gl flags */
                if (1) { //ob_dt > OB_WIRE) {
@@ -4125,7 +4125,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
 
                if(cdata2)
                        MEM_freeN(cdata2);
-               cd2=cdata2=NULL;
+               /* cd2= */ /* UNUSED */ cdata2=NULL;
 
                glLineWidth(1.0f);
 
index 8da6f49..e87ace1 100644 (file)
@@ -183,7 +183,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
 
        float viewnormal[3];
        int i, j, n, good_index;
-       float d, d0, dd, ds;
+       float d /*, d0 */ /* UNUSED */, dd, ds;
        float *points = NULL;
        int numpoints = 0;
        float cor[3] = {1.,1.,1.};
@@ -390,7 +390,8 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
        // (a,b,c), the plane normal, are given by viewdir
        // d is the parameter along the view direction. the first d is given by
        // inserting previously found vertex into the plane equation
-       d0 = (viewnormal[0]*cv[i][0] + viewnormal[1]*cv[i][1] + viewnormal[2]*cv[i][2]);
+
+       /* d0 = (viewnormal[0]*cv[i][0] + viewnormal[1]*cv[i][1] + viewnormal[2]*cv[i][2]); */ /* UNUSED */
        ds = (ABS(viewnormal[0])*size[0] + ABS(viewnormal[1])*size[1] + ABS(viewnormal[2])*size[2]);
        dd = 0.05; // ds/512.0f;
        n = 0;
index d2c7ae3..1c98397 100644 (file)
@@ -2156,12 +2156,12 @@ static void paint_facesel_circle_select(ViewContext *vc, int select, const int m
 {
        Object *ob= vc->obact;
        Mesh *me = ob?ob->data:NULL;
-       int bbsel;
+       /* int bbsel; */ /* UNUSED */
 
        if (me) {
                em_vertoffs= me->totface+1;     /* max index array */
 
-               bbsel= EM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0f));
+               /* bbsel= */ /* UNUSED */ EM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0f));
                EM_backbuf_checkAndSelectTFaces(me, select==LEFTMOUSE);
                EM_free_backbuf();
        }
@@ -2172,12 +2172,12 @@ static void paint_vertsel_circle_select(ViewContext *vc, int select, const int m
 {
        Object *ob= vc->obact;
        Mesh *me = ob?ob->data:NULL;
-       int bbsel;
+       /* int bbsel; */ /* UNUSED */
        /* struct {ViewContext *vc; short select; int mval[2]; float radius; } data = {NULL}; */ /* UNUSED */
        if (me) {
                em_vertoffs= me->totvert+1;     /* max index array */
 
-               bbsel= EM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0f));
+               /* bbsel= */ /* UNUSED */ EM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0f));
                EM_backbuf_checkAndSelectVerts_obmode(me, select==LEFTMOUSE);
                EM_free_backbuf();
 
index c8b9572..f6b4f32 100644 (file)
@@ -4260,7 +4260,6 @@ static int createSlideVerts(TransInfo *t)
        LinkNode *edgelist = NULL, *vertlist=NULL, *look;
        GHash *vertgh;
        TransDataSlideVert *tempsv;
-       float vertdist; // XXX, projectMat[4][4];
        int i, j, numsel, numadded=0, timesthrough = 0, vertsel=0;
        /* UV correction vars */
        GHash **uvarray= NULL;
@@ -4525,7 +4524,6 @@ static int createSlideVerts(TransInfo *t)
 
        look = vertlist;
        nearest = NULL;
-       vertdist = -1;
        while(look) {
                tempsv  = BLI_ghash_lookup(vertgh,(EditVert*)look->link);
 
@@ -5563,7 +5561,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
 
        const short autosnap= getAnimEdit_SnapMode(t);
 
-       float deltax, val, valprev;
+       float deltax, val /* , valprev */;
 
        /* it doesn't matter whether we apply to t->data or t->data2d, but t->data2d is more convenient */
        for (i = 0 ; i < t->total; i++, td++, td2d++) {
@@ -5573,7 +5571,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
                 */
                AnimData *adt= (t->spacetype != SPACE_NLA) ? td->extra : NULL;
 
-               valprev = *td->val;
+               /* valprev = *td->val; */ /* UNUSED */
 
                /* check if any need to apply nla-mapping */
                if (adt && t->spacetype != SPACE_SEQ) {
index 06abd3a..88823a1 100644 (file)
@@ -1807,7 +1807,7 @@ void flushTransParticles(TransInfo *t)
 /* ********************* mesh ****************** */
 
 /* proportional distance based on connectivity  */
-#define THRESHOLD      0.0001f
+#define THRESHOLD      0.000000000000001f
 
 static int connectivity_edge(float mtx[][3], EditVert *v1, EditVert *v2)
 {
@@ -3408,7 +3408,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
                                const char sel3= use_handle ? bezt->f3 & SELECT : 0;
 
                                TransDataCurveHandleFlags *hdata = NULL;
-                               short h1=1, h2=1;
+                               /* short h1=1, h2=1; */ /* UNUSED */
                                
                                /* only include handles if selected, irrespective of the interpolation modes.
                                 * also, only treat handles specially if the center point isn't selected. 
@@ -3418,16 +3418,18 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
                                                hdata = initTransDataCurveHandles(td, bezt);
                                                bezt_to_transdata(td++, td2d++, adt, bezt, 0, 1, 1, intvals, mtx, smtx);
                                        } 
-                                       else
-                                               h1= 0;
+                                       else {
+                                               /* h1= 0; */ /* UNUSED */
+                                       }
                                        
                                        if (sel3) {
                                                if (hdata==NULL)
                                                        hdata = initTransDataCurveHandles(td, bezt);
                                                bezt_to_transdata(td++, td2d++, adt, bezt, 2, 1, 1, intvals, mtx, smtx);
                                        } 
-                                       else
-                                               h2= 0;
+                                       else {
+                                               /* h2= 0; */ /* UNUSED */
+                                       }
                                }
                                
                                /* only include main vert if selected */
index 3b895f5..3637356 100644 (file)
@@ -446,13 +446,13 @@ int calc_manipulator_stats(const bContext *C)
                }
                else if(obedit->type==OB_MBALL) {
                        MetaBall *mb = (MetaBall*)obedit->data;
-                       MetaElem *ml, *ml_sel=NULL;
+                       MetaElem *ml /* , *ml_sel=NULL */ /* UNUSED */;
 
                        ml= mb->editelems->first;
                        while(ml) {
                                if(ml->flag & SELECT) {
                                        calc_tw_center(scene, &ml->x);
-                                       ml_sel = ml;
+                                       /* ml_sel = ml; */ /* UNUSED */
                                        totsel++;
                                }
                                ml= ml->next;
index 80092b7..1b11362 100644 (file)
@@ -391,6 +391,7 @@ static void rna_NodeGroupSocket_update(Main *bmain, Scene *scene, PointerRNA *pt
                node_update(bmain, scene, ntree, node);
 }
 
+#if 0 /* UNUSED */
 static void rna_NodeLink_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
        bNodeTree *ntree= (bNodeTree*)ptr->id.data;
@@ -398,6 +399,7 @@ static void rna_NodeLink_update(Main *bmain, Scene *scene, PointerRNA *ptr)
        ntree->update |= NTREE_UPDATE_LINKS;
        ntreeUpdateTree(ntree);
 }
+#endif
 
 static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max)
 {
index 418d680..cc55569 100644 (file)
@@ -192,7 +192,7 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
        /* Originally based on the information from the book "The Art and Science of Digital Composition" and
         * discussions from vfxtalk.com .*/
        CompBuf *cbuf;
-       CompBuf *mask;
+       /* CompBuf *mask; */ /* UNUSED */
        CompBuf *rgbbuf;
        CompBuf *spillmap;
        NodeColorspill *ncs;
@@ -204,7 +204,7 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
        if(in[0]->data==NULL) return;
        
        cbuf=typecheck_compbuf(in[0]->data, CB_RGBA);
-       mask=typecheck_compbuf(in[1]->data, CB_VAL);
+       /* mask= */ /* UNUSED */ typecheck_compbuf(in[1]->data, CB_VAL);
        spillmap=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1);
        rgbbuf=dupalloc_compbuf(cbuf);
 
index 9f4af0e..f3cb223 100644 (file)
@@ -91,7 +91,7 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **
        CompBuf *outbuf= NULL;
        CompBuf *imbuf1= NULL;
        CompBuf *imbuf2= NULL;
-       NodeChroma *c;
+       /* NodeChroma *c; */ /* UNUSED */
 
        /*is anything connected?*/
        if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
@@ -107,7 +107,7 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **
                imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA);
        }
 
-       c=node->storage;
+       /* c=node->storage; */ /* UNUSED */
        outbuf=dupalloc_compbuf(imbuf1);
 
        /* note, processor gets a keyvals array passed on as buffer constant */
index d7830b6..35f2dbf 100644 (file)
@@ -826,11 +826,11 @@ bNodeTemplate node_forloop_template(bNode *node)
 
 void node_forloop_init(bNodeTree *ntree, bNode *node, bNodeTemplate *ntemp)
 {
-       bNodeSocket *sock;
+       /* bNodeSocket *sock; */ /* UNUSED */
        
        node->id = (ID*)ntemp->ngroup;
        
-       sock = nodeAddInputFloat(ntree, node, "Iterations", PROP_UNSIGNED, 1, 0, 10000);
+       /* sock = */ nodeAddInputFloat(ntree, node, "Iterations", PROP_UNSIGNED, 1, 0, 10000);
        
        /* NB: group socket input/output roles are inverted internally!
         * Group "inputs" work as outputs in links and vice versa.
@@ -932,11 +932,11 @@ void node_loop_update_tree(bNodeTree *ngroup)
 
 void node_whileloop_init(bNodeTree *ntree, bNode *node, bNodeTemplate *ntemp)
 {
-       bNodeSocket *sock;
+       /* bNodeSocket *sock; */ /* UNUSED */
        
        node->id = (ID*)ntemp->ngroup;
        
-       sock = nodeAddInputFloat(ntree, node, "Condition", PROP_NONE, 1, 0, 1);
+       /* sock = */ nodeAddInputFloat(ntree, node, "Condition", PROP_NONE, 1, 0, 1);
        
        /* max iterations */
        node->custom1 = 10000;
index dd5dedd..5c5162d 100644 (file)
@@ -306,7 +306,7 @@ int shadeHaloFloat(HaloRen *har,  float *col, int zz,
 
        /* soften the halo if it intersects geometry */
        if(har->mat && har->mat->mode & MA_HALO_SOFT) {
-               float segment_length, halo_depth, distance_from_z, visible_depth, soften;
+               float segment_length, halo_depth, distance_from_z /* , visible_depth */ /* UNUSED */, soften;
                
                /* calculate halo depth */
                segment_length= har->hasize*sasqrt(1.0f - dist/(har->rad*har->rad));
@@ -317,7 +317,7 @@ int shadeHaloFloat(HaloRen *har,  float *col, int zz,
 
                /* calculate how much of this depth is visible */
                distance_from_z = haloZtoDist(zz) - haloZtoDist(har->zs);
-               visible_depth = halo_depth;
+               /* visible_depth = halo_depth; */ /* UNUSED */
                if(distance_from_z < segment_length) {
                        soften= (segment_length + distance_from_z)/halo_depth;
 
index 980f6b6..36ded5c 100644 (file)
@@ -107,7 +107,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
        ParticleSimulationData sim= {NULL};
        ParticleData *pa=NULL;
        float cfra = BKE_curframe(re->scene);
-       int i, childexists;
+       int i /*, childexists*/ /* UNUSED */;
        int total_particles, offset=0;
        int data_used = point_data_used(pd);
        float partco[3];
@@ -143,9 +143,11 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
        pd->totpoints = total_particles;
        if (data_used & POINT_DATA_VEL) offset = pd->totpoints*3;
        
+#if 0 /* UNUSED */
        if (psys->totchild > 0 && !(psys->part->draw & PART_DRAW_PARENT))
                childexists = 1;
-       
+#endif
+
        for (i=0, pa=psys->particles; i < total_particles; i++, pa++) {
 
                state.time = cfra;
index ad59260..641fec9 100644 (file)
@@ -1994,7 +1994,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
        else {
                /* same as above, but doing 5 taps, increasing quality at cost of speed */
                float STc[3], STl[3], STr[3], STd[3], STu[3];
-               float Hc, Hl, Hr, Hd, Hu;
+               float /* Hc, */ /* UNUSED */  Hl, Hr, Hd, Hu;
 
                texco_mapping(shi, tex, mtex, co, dx, dy, texvec, dxt, dyt);
 
@@ -2017,7 +2017,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
 
                // use texres for the center sample, set rgbnor
                rgbnor = multitex_mtex(shi, mtex, STc, dxt, dyt, texres);
-               Hc = (fromrgb)? RGBTOBW(texres->tr, texres->tg, texres->tb) : texres->tin;
+               /* Hc = (fromrgb)? RGBTOBW(texres->tr, texres->tg, texres->tb) : texres->tin; */ /* UNUSED */
 
                // use ttexr for the other taps
                multitex_mtex(shi, mtex, STl, dxt, dyt, &ttexr);
index 654ec7c..bc5e7f2 100644 (file)
@@ -1515,7 +1515,7 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe
 {
        ShadeInput *shi= ssamp->shi;
        ShadeResult shr;
-       float texfac, orthoarea, nor[3], alpha, sx, sy;
+       float /* texfac,*/ /* UNUSED */ orthoarea, nor[3], alpha, sx, sy;
 
        /* cache for shadow */
        shi->samplenr= R.shadowsamplenr[shi->thread]++;
@@ -1578,7 +1578,7 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe
        VECCOPY(color, shr.combined);
 
        /* texture blending */
-       texfac= shi->mat->sss_texfac;
+       /* texfac= shi->mat->sss_texfac; */ /* UNUSED */
 
        alpha= shr.combined[3];
        *area *= alpha;
index 431b283..41d12c6 100644 (file)
@@ -1502,12 +1502,12 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
                LampRen *lar;
                GroupObject *go;
                float inpr, lv[3];
-               float *view, shadfac[4];
+               float /* *view, */ shadfac[4];
                float ir, accum, visifac, lampdist;
                float shaded = 0.0f, lightness = 0.0f;
                
 
-               view= shi->view;
+               /* view= shi->view; */ /* UNUSED */
                accum= ir= 0.0f;
                
                lights= get_lights(shi);
index ac56304..f36994e 100644 (file)
@@ -2864,7 +2864,7 @@ void RE_zbuf_accumulate_vecblur(NodeBlurData *nbd, int xsize, int ysize, float *
        float v1[3], v2[3], v3[3], v4[3], fx, fy;
        float *rectvz, *dvz, *dimg, *dvec1, *dvec2, *dz, *dz1, *dz2, *rectz;
        float *minvecbufrect= NULL, *rectweight, *rw, *rectmax, *rm, *ro;
-       float maxspeedsq= (float)nbd->maxspeed*nbd->maxspeed, totfac;
+       float maxspeedsq= (float)nbd->maxspeed*nbd->maxspeed;
        int y, x, step, maxspeed=nbd->maxspeed, samples= nbd->samples;
        int tsktsk= 0;
        static int firsttime= 1;
@@ -3038,7 +3038,6 @@ void RE_zbuf_accumulate_vecblur(NodeBlurData *nbd, int xsize, int ysize, float *
        }
        
        memset(newrect, 0, sizeof(float)*xsize*ysize*4);
-       totfac= 0.0f;
 
        /* accumulate */
        samples/= 2;
index de4afa7..52c0cb9 100644 (file)
@@ -232,7 +232,7 @@ static void wm_gesture_draw_circle(wmGesture *gt)
 static void draw_filled_lasso(wmGesture *gt)
 {
        EditVert *v=NULL, *lastv=NULL, *firstv=NULL;
-       EditEdge *e;
+       /* EditEdge *e; */ /* UNUSED */
        EditFace *efa;
        short *lasso= (short *)gt->customdata;
        int i;
@@ -246,7 +246,7 @@ static void draw_filled_lasso(wmGesture *gt)
 
                v = BLI_addfillvert(co);
                if (lastv)
-                       e = BLI_addfilledge(lastv, v);
+                       /* e = */ /* UNUSED */ BLI_addfilledge(lastv, v);
                lastv = v;
                if (firstv==NULL) firstv = v;
        }