[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40540] trunk/blender/source/blender/ editors: Commented and tagged some unused vars (gcc warnings...).

Bastien Montagne montagne29 at wanadoo.fr
Sun Sep 25 17:37:07 CEST 2011


Revision: 40540
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40540
Author:   mont29
Date:     2011-09-25 15:37:06 +0000 (Sun, 25 Sep 2011)
Log Message:
-----------
Commented and tagged some unused vars (gcc warnings...).

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_channels_defines.c
    trunk/blender/source/blender/editors/animation/fmodifier_ui.c
    trunk/blender/source/blender/editors/armature/editarmature_retarget.c
    trunk/blender/source/blender/editors/mesh/editmesh_mods.c
    trunk/blender/source/blender/editors/mesh/editmesh_tools.c

Modified: trunk/blender/source/blender/editors/animation/anim_channels_defines.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2011-09-25 12:33:51 UTC (rev 40539)
+++ trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2011-09-25 15:37:06 UTC (rev 40540)
@@ -3051,7 +3051,7 @@
 /* Draw a widget for some setting */
 static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChannelType *acf, uiBlock *block, int xpos, int ypos, int setting)
 {
-	short negflag, ptrsize, enabled, butType;
+	short negflag, ptrsize /* , enabled */ /* UNUSED */, butType;
 	int flag, icon;
 	void *ptr;
 	const char *tooltip;
@@ -3060,7 +3060,7 @@
 	/* get the flag and the pointer to that flag */
 	flag= acf->setting_flag(ac, setting, &negflag);
 	ptr= acf->setting_ptr(ale, setting, &ptrsize);
-	enabled= ANIM_channel_setting_get(ac, ale, setting);
+	/* enabled= ANIM_channel_setting_get(ac, ale, setting); */ /* UNUSED */
 	
 	/* get the base icon for the setting */
 	switch (setting) {

Modified: trunk/blender/source/blender/editors/animation/fmodifier_ui.c
===================================================================
--- trunk/blender/source/blender/editors/animation/fmodifier_ui.c	2011-09-25 12:33:51 UTC (rev 40539)
+++ trunk/blender/source/blender/editors/animation/fmodifier_ui.c	2011-09-25 15:37:06 UTC (rev 40540)
@@ -112,7 +112,7 @@
 static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, short width)
 {
 	FMod_Generator *data= (FMod_Generator *)fcm->data;
-	uiLayout *col, *row;
+	uiLayout /* *col, */ /* UNUSED */ *row;
 	uiBlock *block;
 	uiBut *but;
 	PointerRNA ptr;
@@ -121,7 +121,7 @@
 	RNA_pointer_create(id, &RNA_FModifierFunctionGenerator, fcm, &ptr);
 	
 	/* basic settings (backdrop + mode selector + some padding) */
-	col= uiLayoutColumn(layout, 1);
+	/* col= uiLayoutColumn(layout, 1); */ /* UNUSED */
 	block= uiLayoutGetBlock(layout);
 	uiBlockBeginAlign(block);
 		but= uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL);
@@ -521,7 +521,7 @@
 /* draw settings for limits modifier */
 static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width))
 {
-	uiLayout *split, *col, *row;
+	uiLayout *split, *col /* , *row */ /* UNUSED */;
 	PointerRNA ptr;
 	
 	/* init the RNA-pointer */
@@ -529,7 +529,7 @@
 	
 	/* row 1: minimum */
 	{
-		row= uiLayoutRow(layout, 0);
+		/* row= uiLayoutRow(layout, 0); */ /* UNUSED */
 		
 		/* split into 2 columns */
 		split= uiLayoutSplit(layout, 0.5f, 0);
@@ -547,7 +547,7 @@
 	
 	/* row 2: maximum */
 	{
-		row= uiLayoutRow(layout, 0);
+		/* row= uiLayoutRow(layout, 0); */ /* UNUSED */
 		
 		/* split into 2 columns */
 		split= uiLayoutSplit(layout, 0.5f, 0);

Modified: trunk/blender/source/blender/editors/armature/editarmature_retarget.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature_retarget.c	2011-09-25 12:33:51 UTC (rev 40539)
+++ trunk/blender/source/blender/editors/armature/editarmature_retarget.c	2011-09-25 15:37:06 UTC (rev 40540)
@@ -1889,7 +1889,7 @@
 	RigEdge *edge;
 	int large_angle = 0;
 	float avg_angle = 0;
-	float avg_length = 0;
+	/* float avg_length = 0; */ /* UNUSED */
 	int nb_edges = 0;
 	
 	
@@ -1901,7 +1901,7 @@
 	
 	avg_angle /= nb_edges - 1; /* -1 because last edge doesn't have an angle */
 
-	avg_length = iarc->length / nb_edges;
+	/* avg_length = iarc->length / nb_edges; */  /* UNUSED */
 	
 	
 	if (nb_edges > 2)
@@ -2202,7 +2202,9 @@
 	float angle_weight = 1.0; // GET FROM CONTEXT
 	float length_weight = 1.0;
 	float distance_weight = 1.0;
+#ifndef USE_THREADS
 	float min_cost = FLT_MAX;
+#endif
 	float *vec0, *vec1;
 	int *best_positions;
 	int nb_edges = BLI_countlist(&iarc->edges);
@@ -2245,7 +2247,9 @@
 		int nb_positions = earc->bcount;
 		int nb_memo_nodes = nb_positions * nb_positions * (nb_joints + 1);
 		MemoNode *table = MEM_callocN(nb_memo_nodes * sizeof(MemoNode), "memoization table");
+#ifndef USE_THREADS
 		MemoNode *result;
+#endif
 		float **positions_cache = MEM_callocN(sizeof(float*) * (nb_positions + 2), "positions cache");
 		int i;
 		
@@ -2260,11 +2264,15 @@
 			positions_cache[i] = bucket->p;
 		}
 
+#ifndef USE_THREADS
 		result = solveJoints(table, iter, positions_cache, nb_joints, earc->bcount, 0, 0, iarc->edges.first, nb_joints, angle_weight, length_weight, distance_weight);
-		
 		min_cost = result->weight;
+#else
+		solveJoints(table, iter, positions_cache, nb_joints, earc->bcount, 0, 0, iarc->edges.first, nb_joints, angle_weight, length_weight, distance_weight);
+#endif
+
 		copyMemoPositions(best_positions, table, earc->bcount, nb_joints);
-		
+
 		MEM_freeN(table);
 		MEM_freeN(positions_cache);
 	}

Modified: trunk/blender/source/blender/editors/mesh/editmesh_mods.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_mods.c	2011-09-25 12:33:51 UTC (rev 40539)
+++ trunk/blender/source/blender/editors/mesh/editmesh_mods.c	2011-09-25 15:37:06 UTC (rev 40540)
@@ -137,7 +137,7 @@
 void EM_automerge(Scene *scene, Object *obedit, int update)
 {
 	Mesh *me= obedit ? obedit->data : NULL; /* can be NULL */
-	int len;
+	/* int len; */ /* UNUSED */
 
 	if ((scene->toolsettings->automerge) &&
 		(obedit && obedit->type==OB_MESH && (obedit->mode & OB_MODE_EDIT))
@@ -145,7 +145,7 @@
 		EditMesh *em= me->edit_mesh;
 		int totvert= em->totvert, totedge= em->totedge, totface= em->totface;
 
-		len = removedoublesflag(em, 1, 1, scene->toolsettings->doublimit);
+		/* len = */ /* UNUSED */ removedoublesflag(em, 1, 1, scene->toolsettings->doublimit);
 		if (totvert != em->totvert || totedge != em->totedge || totface != em->totface) {
 			if (update) {
 				DAG_id_tag_update(&me->id, 0);

Modified: trunk/blender/source/blender/editors/mesh/editmesh_tools.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_tools.c	2011-09-25 12:33:51 UTC (rev 40539)
+++ trunk/blender/source/blender/editors/mesh/editmesh_tools.c	2011-09-25 15:37:06 UTC (rev 40540)
@@ -1591,7 +1591,7 @@
 	EditEdge *cedge=NULL;
 	EditVert *v[4], **verts;
 	EditFace *hold;
-	short start=0, end, left, right, vertsize,i;
+	short start=0, /* end, */ /* UNUSED */ left, right, vertsize,i;
 
 	v[0] = efa->v1;
 	v[1] = efa->v2;
@@ -1613,7 +1613,7 @@
 	// the array to the correct direction
 
 	if(verts[0] != v[start]) {flipvertarray(verts,numcuts+2);}
-	end	= (start+1)%4;
+	/* end	= (start+1)%4; */ /* UNUSED */
 	left   = (start+2)%4;
 	right  = (start+3)%4;
 
@@ -1677,7 +1677,7 @@
 	EditEdge *cedge=NULL;
 	EditVert *v[3], **verts;
 	EditFace *hold;
-	short start=0, end, op, vertsize,i;
+	short start=0, /* end, */ /* UNUSED */ op, vertsize,i;
 
 	v[0] = efa->v1;
 	v[1] = efa->v2;
@@ -1697,8 +1697,8 @@
 	// the array to the correct direction
 
 	if(verts[0] != v[start]) {flipvertarray(verts,numcuts+2);}
-	   end	= (start+1)%3;
-	   op	 = (start+2)%3;
+	/* end = (start+1)%3; */ /* UNUSED */
+	op = (start+2)%3;
 
 	/*
 	We should have something like this now
@@ -1888,7 +1888,7 @@
 	EditEdge *cedge[2]={NULL, NULL};
 	EditVert *v[4], *op=NULL, **verts[2];
 	EditFace *hold;
-	short start=0, start2=0, vertsize,i;
+	short start=0, start2=0, /* vertsize, */ /* UNUSED */ i;
 
 	v[0] = efa->v1;
 	v[1] = efa->v2;
@@ -1905,7 +1905,7 @@
 	verts[0] = BLI_ghash_lookup(gh, cedge[0]);
 	verts[1] = BLI_ghash_lookup(gh, cedge[1]);
 	//This is the index size of the verts array
-	vertsize = numcuts+2;
+	/* vertsize = numcuts+2; */ /* UNUSED */
 
 	// Is the original v1 the same as the first vert on the selected edge?
 	// if not, the edge is running the opposite direction in this face so flip
@@ -1952,7 +1952,7 @@
 	EditEdge *cedge[2]={NULL, NULL};
 	EditVert *v[4], *op=NULL, **verts[2],**inner;
 	EditFace *hold;
-	short start=0, start2=0, vertsize,i;
+	short start=0, start2=0, /* vertsize, */ /* UNUSED */ i;
 	float co[3];
 
 	v[0] = efa->v1;
@@ -1970,7 +1970,7 @@
 	verts[0] = BLI_ghash_lookup(gh, cedge[0]);
 	verts[1] = BLI_ghash_lookup(gh, cedge[1]);
 	//This is the index size of the verts array
-	vertsize = numcuts+2;
+	/* vertsize = numcuts+2; */ /* UNUSED */
 
 	// Is the original v1 the same as the first vert on the selected edge?
 	// if not, the edge is running the opposite direction in this face so flip
@@ -2297,7 +2297,7 @@
 	EditVert **verts[4], ***innerverts;
 	EditFace *hold;
 	EditEdge temp;
-	short vertsize, i, j;
+	short /* vertsize, */ /* UNUSED */ i, j;
 
 	// Point verts[0] and [1] to the array of new verts for cedge[0] and cedge[1]
 	verts[0] = BLI_ghash_lookup(gh, efa->e1);
@@ -2306,7 +2306,7 @@
 	verts[3] = BLI_ghash_lookup(gh, efa->e4);
 
 	//This is the index size of the verts array
-	vertsize = numcuts+2;
+	/* vertsize = numcuts+2; */ /* UNUSED */
 
 	// Is the original v1 the same as the first vert on the selected edge?
 	// if not, the edge is running the opposite direction in this face so flip
@@ -2392,7 +2392,7 @@
 static void fill_tri_triple(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, float smooth, float fractal, int beauty)
 {
 	EditVert **verts[3], ***innerverts;
-	short vertsize, i, j;
+	short /* vertsize, */ /* UNUSED */ i, j;
 	EditFace *hold;
 	EditEdge temp;
 
@@ -2402,7 +2402,7 @@
 	verts[2] = BLI_ghash_lookup(gh, efa->e3);
 
 	//This is the index size of the verts array
-	vertsize = numcuts+2;
+	/* vertsize = numcuts+2; */ /* UNUSED */
 
 	// Is the original v1 the same as the first vert on the selected edge?
 	// if not, the edge is running the opposite direction in this face so flip
@@ -2547,7 +2547,7 @@
 	EditEdge *cedge=NULL;
 	EditVert *v[4], **verts;
 	EditFace *hold;
-	short start=0, end, left, right, vertsize;
+	short start=0, end, left, right /* , vertsize */ /* UNUSED */;
 
 	v[0] = efa->v1;
 	v[1] = efa->v2;
@@ -2562,7 +2562,7 @@
 	// Point verts to the array of new verts for cedge
 	verts = BLI_ghash_lookup(gh, cedge);
 	//This is the index size of the verts array
-	vertsize = 3;
+	/* vertsize = 3; */ /* UNUSED */
 
 	// Is the original v1 the same as the first vert on the selected edge?
 	// if not, the edge is running the opposite direction in this face so flip
@@ -3629,7 +3629,7 @@
 static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed, int dir)
 {
 	EditVert **verts[2];

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list