Commented and tagged some unused vars (gcc warnings...). Also fixed some uninitialize...
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 26 Sep 2011 13:24:42 +0000 (13:24 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 26 Sep 2011 13:24:42 +0000 (13:24 +0000)
source/blender/blenkernel/intern/BME_conversions.c
source/blender/editors/armature/reeb.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/space_text/text_python.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_parametrizer.c

index 4f83d25409ac02fd9db96e916305320b5f57b44e..9a3c946293475abfc6e77592154c73581b74ba7a 100644 (file)
@@ -353,7 +353,7 @@ void BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td, EditMesh *em) {
        
        BME_TransData *vtd;
 
-       EditVert *eve1, *eve2, *eve3, *eve4, **evlist;
+       EditVert *eve1, /* *eve2, *eve3, *eve4, */ /* UNUSED */ **evlist;
        EditEdge *eed;
        EditFace *efa;
 
@@ -410,14 +410,14 @@ void BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td, EditMesh *em) {
                len = BME_cycle_length(f->loopbase);
                if (len==3 || len==4) {
                        eve1= evlist[f->loopbase->v->tflag1];
-                       eve2= evlist[f->loopbase->next->v->tflag1];
-                       eve3= evlist[f->loopbase->next->next->v->tflag1];
-                       if (len == 4) {
+                       /* eve2= evlist[f->loopbase->next->v->tflag1]; */ /* UNUSED */
+                       /* eve3= evlist[f->loopbase->next->next->v->tflag1]; */ /* UNUSED */
+                       /* if (len == 4) {
                                eve4= evlist[f->loopbase->prev->v->tflag1];
                        }
                        else {
                                eve4= NULL;
-                       }
+                       } */ /* UNUSED */
 
                        efa = NULL; //XXX addfacelist(eve1, eve2, eve3, eve4, NULL, NULL);
                        efa->mat_nr = (unsigned char)f->mat_nr;
@@ -539,7 +539,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm)
        MEdge *medge, *me;
        MVert *mvert, *mv;
        int *origindex;
-       int totface,totedge,totvert,i,bmeshok,len, numTex, numCol;
+       int totface, totedge, totvert, i, /* bmeshok, */ /* UNUSED */ len, numTex, numCol;
 
        BME_Vert *v1=NULL;
        BME_Edge *e=NULL, *oe=NULL;
@@ -567,7 +567,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm)
        
        /*count quads and tris*/
        totface = 0;
-       bmeshok = 1;
+       /* bmeshok = 1; */ /* UNUSED */
        for(f=bm->polys.first;f;f=f->next){
                len = BME_cycle_length(f->loopbase);
                if(len == 3 || len == 4) totface++;
index 04501243acb346ae59a045a3ebc288ac266dd860..78c9e601d87f081938168f96de3219f89e7b748a 100644 (file)
@@ -1353,11 +1353,11 @@ static int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs)
                
                if (end_node && start_node)
                {
-                       ReebArc *start_arc, *end_arc;
+                       ReebArc *start_arc /* , *end_arc */ /* UNUSED */;
                        int merging = 0;
                        
                        start_arc = start_node->arcs[0];
-                       end_arc = end_node->arcs[0];
+                       /* end_arc = end_node->arcs[0]; */ /* UNUSED */
                        
                        if (start_arc->tail == start_node)
                        {
index 5265261f3af7f1da53745c99927a3404243cbb76..e55a99ae2abc1430e986b8503a1fed0d2d71793c 100644 (file)
@@ -939,7 +939,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
        int totweight = dvert->totweight;
        float oldw = 0;
        float oldPos[3] = {0};
-       float vc, hc, dist;
+       float vc, hc, dist = 0.0f /* Not necessary, but quites down gcc warnings! */;
        int i, k;
        float (*changes)[2] = MEM_mallocN(sizeof(float *)*totweight*2, "vertHorzChange");
        float *dists = MEM_mallocN(sizeof(float)*totweight, "distance");
index 51b4b8381715fb1fe1033673ccc288f5b347d453..08008f455e64a39d86fd45ebf1f783154d4e37e9 100644 (file)
@@ -51,7 +51,7 @@
 
 int text_do_suggest_select(SpaceText *st, ARegion *ar)
 {
-       SuggItem *item, *first, *last, *sel;
+       SuggItem *item, *first, *last /* , *sel */ /* UNUSED */;
        TextLine *tmp;
        int l, x, y, w, h, i;
        int tgti, *top;
@@ -62,7 +62,7 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
 
        first = texttool_suggest_first();
        last = texttool_suggest_last();
-       sel = texttool_suggest_selected();
+       /* sel = texttool_suggest_selected(); */ /* UNUSED */
        top = texttool_suggest_top();
 
        if(!last || !first)
index c1aca61f7950e60e6401dd935d2348d9e7438c62..55fda84874d7a9f5316041a75175393f54062f88 100644 (file)
@@ -471,7 +471,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
                if(totitem > 0) {
                        uiPopupMenu *pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
                        uiLayout *layout= uiPupMenuLayout(pup);
-                       uiLayout *split= uiLayoutSplit(layout, 0, 0), *column;
+                       uiLayout *split= uiLayoutSplit(layout, 0, 0), *column = NULL;
                        int i, c;
                        
                        for(c=0, i=totitem-1; i >= 0; i--, c++) {
index 846b05c12874926f06c7ab3ffc6e926a13867baa..1b117a15516ac15a25f1738c7439d47575905584 100644 (file)
@@ -2624,7 +2624,7 @@ static PBool p_chart_abf_solve(PChart *chart)
        PEdge *e, *e1, *e2, *e3;
        PAbfSystem sys;
        int i;
-       float lastnorm, limit = (chart->nfaces > 100)? 1.0f: 0.001f;
+       float /* lastnorm, */ /* UNUSED */ limit = (chart->nfaces > 100)? 1.0f: 0.001f;
 
        /* setup id's */
        sys.ninterior = sys.nfaces = sys.nangles = 0;
@@ -2703,12 +2703,12 @@ static PBool p_chart_abf_solve(PChart *chart)
                p_abf_compute_sines(&sys);
 
                /* iteration */
-               lastnorm = 1e10;
+               /* lastnorm = 1e10; */ /* UNUSED */
 
                for (i = 0; i < ABF_MAX_ITER; i++) {
                        float norm = p_abf_compute_gradient(&sys, chart);
 
-                       lastnorm = norm;
+                       /* lastnorm = norm; */ /* UNUSED */
 
                        if (norm < limit)
                                break;
@@ -3609,7 +3609,7 @@ static SmoothNode *p_node_new(MemArena *arena, SmoothTriangle **tri, int ntri, f
 {
        SmoothNode *node = BLI_memarena_alloc(arena, sizeof *node);
        int axis, i, t1size = 0, t2size = 0;
-       float split, mi, mx;
+       float split, /* mi, */ /* UNUSED */ mx;
        SmoothTriangle **t1, **t2, *t;
 
        node->tri = tri;
@@ -3650,7 +3650,7 @@ static SmoothNode *p_node_new(MemArena *arena, SmoothTriangle **tri, int ntri, f
        node->axis = axis;
        node->split = split;
 
-       mi = bmin[axis];
+       /* mi = bmin[axis]; */ /* UNUSED */
        mx = bmax[axis];
        bmax[axis] = split;
        node->c1 = p_node_new(arena, t1, t1size, bmin, bmax, depth+1);