[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45006] trunk/blender: Quiet warnings about unused functions and variables.

Nicholas Bishop nicholasbishop at gmail.com
Mon Mar 19 23:21:41 CET 2012


Revision: 45006
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45006
Author:   nicholasbishop
Date:     2012-03-19 22:21:40 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
Quiet warnings about unused functions and variables.

Commented or '#if 0' these functions/variables and marked with
'UNUSED' comment so they can be restored in the future if needed.

Modified Paths:
--------------
    trunk/blender/intern/decimation/intern/LOD_QSDecimator.cpp
    trunk/blender/source/blender/bmesh/tools/BME_bevel.c
    trunk/blender/source/blender/editors/armature/reeb.c
    trunk/blender/source/blender/editors/interface/interface.c
    trunk/blender/source/blender/editors/transform/transform.c
    trunk/blender/source/blender/editors/uvedit/uvedit_ops.c

Modified: trunk/blender/intern/decimation/intern/LOD_QSDecimator.cpp
===================================================================
--- trunk/blender/intern/decimation/intern/LOD_QSDecimator.cpp	2012-03-19 21:40:17 UTC (rev 45005)
+++ trunk/blender/intern/decimation/intern/LOD_QSDecimator.cpp	2012-03-19 22:21:40 UTC (rev 45006)
@@ -265,9 +265,11 @@
 	// load in edge pointers to the heap
 
 	std::vector<LOD_Edge> & edge_set= m_mesh.EdgeSet();
-	std::vector<LOD_Edge>::const_iterator edge_end = edge_set.end();
-	std::vector<LOD_Edge>::iterator edge_start = edge_set.begin();
 
+	// UNUSED
+	// std::vector<LOD_Edge>::const_iterator edge_end = edge_set.end();
+	// std::vector<LOD_Edge>::iterator edge_start = edge_set.begin();
+
 	std::vector<int> & heap_vector = m_heap->HeapVector();
 
 	for (unsigned int i = 0; i < edge_set.size(); ++i) {

Modified: trunk/blender/source/blender/bmesh/tools/BME_bevel.c
===================================================================
--- trunk/blender/source/blender/bmesh/tools/BME_bevel.c	2012-03-19 21:40:17 UTC (rev 45005)
+++ trunk/blender/source/blender/bmesh/tools/BME_bevel.c	2012-03-19 22:21:40 UTC (rev 45006)
@@ -300,6 +300,9 @@
 	float maxfactor, scale, len, dis, vec1[3], vec2[3], t_up_vec[3];
 	int is_edge, forward, is_split_vert;
 
+	/* ov, vtd2, and is_split_vert are set but UNUSED */
+	(void)ov, (void)vtd2, (void)is_split_vert;
+
 	if (l == NULL) {
 		/* what you call operator overloading in C :)
 		 * I wanted to use the same function for both wire edges and poly loops
@@ -646,7 +649,7 @@
 static BMLoop *BME_bevel_vert(BMesh *bm, BMLoop *l, float value, int UNUSED(options), float *up_vec, BME_TransData_Head *td)
 {
 	BMVert *v1, *v2;
-	BMFace *f;
+	/* BMFace *f; */ /* UNUSED */
 
 	/* get/make the first vert to be used in SFME */
 	/* may need to split the previous edge */
@@ -659,7 +662,7 @@
 	l = l->next->next;
 
 	/* "cut off" this corner */
-	f = BM_face_split(bm, l->f, v2, v1, NULL, l->e, FALSE);
+	/* f = */ BM_face_split(bm, l->f, v2, v1, NULL, l->e, FALSE);
 
 	return l;
 }

Modified: trunk/blender/source/blender/editors/armature/reeb.c
===================================================================
--- trunk/blender/source/blender/editors/armature/reeb.c	2012-03-19 21:40:17 UTC (rev 45005)
+++ trunk/blender/source/blender/editors/armature/reeb.c	2012-03-19 22:21:40 UTC (rev 45006)
@@ -115,6 +115,7 @@
 
 /***************************************** UTILS **********************************************/
 
+#if 0 /* UNUSED */
 static VertexData *allocVertexData(EditMesh *em)
 {
 	VertexData *data;
@@ -160,6 +161,8 @@
 	((VertexData*)eve->tmp.p)->n = n;
 }
 
+#endif
+
 void REEB_freeArc(BArc *barc)
 {
 	ReebArc *arc = (ReebArc*)barc;
@@ -232,6 +235,7 @@
 	}
 }
 
+#if 0 /* UNUSED */
 static ReebNode * addNode(ReebGraph *rg, EditVert *eve)
 {
 	float weight;
@@ -300,6 +304,7 @@
 		}
 	}
 }
+#endif 
 
 ReebNode *BIF_otherNodeFromIndex(ReebArc *arc, ReebNode *node)
 {
@@ -321,6 +326,7 @@
 	return node;
 }
 
+#if 0 /* UNUSED */
 static ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
 {
 	ReebArc *cp_arc;
@@ -395,6 +401,7 @@
 	
 	return cp_rg;
 }
+#endif
 
 ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node)
 {
@@ -408,6 +415,7 @@
 	return multi_rg;
 }
 
+#if 0 /* UNUSED */
 static ReebEdge * copyEdge(ReebEdge *edge)
 {
 	ReebEdge *newEdge = NULL;
@@ -954,6 +962,7 @@
 		calculateArcLength(arc);
 	}
 }
+#endif
 
 /**************************************** SYMMETRY HANDLING ******************************************/
 
@@ -1160,6 +1169,7 @@
 
 /****************************************** SMOOTHING **************************************************/
 
+#if 0 /* UNUSED */
 void postprocessGraph(ReebGraph *rg, char mode)
 {
 	ReebArc *arc;
@@ -3138,6 +3148,7 @@
 	
 	return 1;
 }
+#endif
 
 /****************************************** BUCKET ITERATOR **************************************************/
 

Modified: trunk/blender/source/blender/editors/interface/interface.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface.c	2012-03-19 21:40:17 UTC (rev 45005)
+++ trunk/blender/source/blender/editors/interface/interface.c	2012-03-19 22:21:40 UTC (rev 45006)
@@ -2837,12 +2837,15 @@
 
 	return but;
 }
+
+#if 0 /* UNUSED */
 static uiBut *UNUSED_FUNCTION(ui_def_but_operator)(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip)
 {
 	wmOperatorType *ot = WM_operatortype_find(opname, 0);
 	if (str == NULL && ot == NULL) str = opname;
 	return ui_def_but_operator_ptr(block, type, ot, opcontext, str, x1, y1, x2, y2, tip);
 }
+#endif
 
 static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip)
 {

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c	2012-03-19 21:40:17 UTC (rev 45005)
+++ trunk/blender/source/blender/editors/transform/transform.c	2012-03-19 22:21:40 UTC (rev 45006)
@@ -4361,7 +4361,7 @@
 	BMEditMesh *em = me->edit_btmesh;
 	BMesh *bm = em->bm;
 	BMIter iter, iter2;
-	BMEdge *e, *e1, *ee, *le;
+	BMEdge *e, *e1 /*, *ee, *le */ /* UNUSED */;
 	BMVert *v, *v2, *first;
 	BMLoop *l, *l1, *l2;
 	TransDataSlideVert *tempsv;
@@ -4373,7 +4373,7 @@
 	ARegion *ar = t->ar;
 	float projectMat[4][4];
 	float start[3] = {0.0f, 0.0f, 0.0f}, dir[3], end[3] = {0.0f, 0.0f, 0.0f};
-	float vec[3], vec2[3], lastvec[3], size, dis=0.0, z;
+	float vec[3], vec2[3], lastvec[3] /*, size, dis=0.0, z */ /* UNUSED */;
 	int numsel, i, j;
 
 	if (!v3d) {
@@ -4547,10 +4547,10 @@
 	sld->totsv = j;
 	
 	/*find mouse vector*/
-	dis = z = -1.0f;
-	size = 50.0;
+	/* dis = z = -1.0f; */ /* UNUSED */
+	/* size = 50.0; */ /* UNUSED */
 	zero_v3(lastvec); zero_v3(dir);
-	ee = le = NULL;
+	/* ee = le = NULL; */ /* UNUSED */
 	BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
 		if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
 			BMIter iter2;
@@ -4588,8 +4588,8 @@
 					d = dist_to_line_segment_v2(mval, vec1, vec2);
 					if (dis2 == -1.0f || d < dis2) {
 						dis2 = d;
-						ee = e2;
-						size = len_v3v3(vec1, vec2);
+						/* ee = e2; */ /* UNUSED */
+						/* size = len_v3v3(vec1, vec2); */ /* UNUSED */
 						sub_v3_v3v3(dir, vec1, vec2);
 					}
 				}
@@ -4680,7 +4680,7 @@
 			BMIter liter2;
 			BMFace *copyf, *copyf2;
 			BMLoop *l2;
-			int sel, hide, do_vdata;
+			int sel, hide /*, do_vdata */ /* UNUSED */;
 			
 			if (BLI_smallhash_haskey(&visit, (uintptr_t)f))
 				continue;
@@ -4698,12 +4698,12 @@
 			/*project onto copied projection face*/
 			BM_ITER(l2, &liter2, em->bm, BM_LOOPS_OF_FACE, f) {
 				copyf = copyf2;
-				do_vdata = l2->v==tempsv->v;
+				/* do_vdata = l2->v==tempsv->v; */ /* UNUSED */
 				
 				if (BM_elem_flag_test(l2->e, BM_ELEM_SELECT) || BM_elem_flag_test(l2->prev->e, BM_ELEM_SELECT)) {
 					BMLoop *l3 = l2;
 					
-					do_vdata = 1;
+					/* do_vdata = 1; */ /* UNUSED */
 					
 					if (!BM_elem_flag_test(l2->e, BM_ELEM_SELECT))
 						l3 = l3->prev;

Modified: trunk/blender/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_ops.c	2012-03-19 21:40:17 UTC (rev 45005)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_ops.c	2012-03-19 22:21:40 UTC (rev 45006)
@@ -767,7 +767,7 @@
 	BMLoop *l;
 	MLoopUV *luv;
 	BMIter iter;
-	float m[3], v1[3], v2[3], c1, c2, *uv1, *uv2, *uv3;
+	float m[3], v1[3], v2[3], c1, c2, *uv1, /* *uv2, */ /* UNUSED */ *uv3;
 	int id1, id2, i;
 
 	id1= (id+efa->len-1)%efa->len;
@@ -783,7 +783,7 @@
 		if (i == id1)
 			uv1 = luv->uv;
 		else if (i == id)
-			uv2 = luv->uv;
+			; /* uv2 = luv->uv; */ /* UNUSED */
 		else if (i == id2)
 			uv3 = luv->uv;
 
@@ -2005,7 +2005,9 @@
 			else if(flush==-1)	EDBM_deselect_flush(em);
 		}
 	}
-
+#else
+	(void)flush; /* flush is otherwise UNUSED */
+	(void)sync; /* sync is otherwise UNUSED */
 #endif
 
 	DAG_id_tag_update(obedit->data, 0);




More information about the Bf-blender-cvs mailing list