[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40659] trunk/blender/source/blender: Commented and tagged some unused vars, added some var init (gcc warnings.. .)

Bastien Montagne montagne29 at wanadoo.fr
Wed Sep 28 17:22:14 CEST 2011


Revision: 40659
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40659
Author:   mont29
Date:     2011-09-28 15:22:13 +0000 (Wed, 28 Sep 2011)
Log Message:
-----------
Commented and tagged some unused vars, added some var init (gcc warnings...)

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/cloth.c
    trunk/blender/source/blender/blenkernel/intern/collision.c
    trunk/blender/source/blender/editors/animation/anim_filter.c
    trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c
    trunk/blender/source/blender/gpu/intern/gpu_material.c
    trunk/blender/source/blender/imbuf/intern/anim_movie.c
    trunk/blender/source/blender/modifiers/intern/MOD_explode.c

Modified: trunk/blender/source/blender/blenkernel/intern/cloth.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/cloth.c	2011-09-28 14:12:27 UTC (rev 40658)
+++ trunk/blender/source/blender/blenkernel/intern/cloth.c	2011-09-28 15:22:13 UTC (rev 40659)
@@ -741,7 +741,7 @@
 	MDeformVert *dvert = NULL;
 	Cloth *clothObj = NULL;
 	int numverts;
-	float goalfac = 0;
+	/* float goalfac = 0; */ /* UNUSED */
 	ClothVertex *verts = NULL;
 
 	if (!clmd || !dm) return;
@@ -764,7 +764,7 @@
 					if (( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_mass-1)) && (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ))
 					{
 						verts->goal = dvert->dw [j].weight;
-						goalfac= 1.0f;
+						/* goalfac= 1.0f; */ /* UNUSED */
 						
 						/*
 						// Kicking goal factor to simplify things...who uses that anyway?

Modified: trunk/blender/source/blender/blenkernel/intern/collision.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/collision.c	2011-09-28 14:12:27 UTC (rev 40658)
+++ trunk/blender/source/blender/blenkernel/intern/collision.c	2011-09-28 15:22:13 UTC (rev 40659)
@@ -2364,7 +2364,7 @@
 {
 	Cloth *cloth= clmd->clothObject;
 	BVHTree *cloth_bvh= cloth->bvhtree;
-	unsigned int i=0, numfaces = 0, numverts = 0, k, l, j;
+	unsigned int i=0, /* numfaces = 0, */ /* UNUSED */ numverts = 0, k, l, j;
 	int rounds = 0; // result counts applied collisions; ic is for debug output;
 	ClothVertex *verts = NULL;
 	int ret = 0, ret2 = 0;
@@ -2375,7 +2375,7 @@
 		return 0;
 	
 	verts = cloth->verts;
-	numfaces = cloth->numfaces;
+	/* numfaces = cloth->numfaces; */ /* UNUSED */
 	numverts = cloth->numverts;
 
 	////////////////////////////////////////////////////////////
@@ -2477,7 +2477,7 @@
 				// collisions = 1;
 				verts = cloth->verts; // needed for openMP
 	
-				numfaces = cloth->numfaces;
+				/* numfaces = cloth->numfaces; */ /* UNUSED */
 				numverts = cloth->numverts;
 	
 				verts = cloth->verts;

Modified: trunk/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_filter.c	2011-09-28 14:12:27 UTC (rev 40658)
+++ trunk/blender/source/blender/editors/animation/anim_filter.c	2011-09-28 15:22:13 UTC (rev 40659)
@@ -344,15 +344,19 @@
  *	   keep expander channels with no sub-data out, as those cases should get
  *	   dealt with by the recursive detection idiom in place.
  */
+/* XXX Commented most of that macro, since it seems that _doSubChannels var is never used...
+ *     mont29.
+ */
 #define BEGIN_ANIMFILTER_SUBCHANNELS(expanded_check) \
 	{ \
 		int _filter = filter_mode; \
-		short _doSubChannels = 0; \
-		if (!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check)) \
-			_doSubChannels=1; \
-		else if (!(filter_mode & ANIMFILTER_LIST_CHANNELS)) \
-			_doSubChannels=2; \
-		else {\
+/*		short _doSubChannels = 0; \*/ \
+/*		if (!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check)) \*/ \
+/*			_doSubChannels=1; \*/ \
+/*		else if (!(filter_mode & ANIMFILTER_LIST_CHANNELS)) \*/ \
+/*			_doSubChannels=2; \*/ \
+/*		else {\*/ \
+		if (!(!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check) || !(filter_mode & ANIMFILTER_LIST_CHANNELS))) { \
 			filter_mode |= ANIMFILTER_TMP_PEEK; \
 		}
 		/* ... standard sub-channel filtering can go on here now ... */

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c	2011-09-28 14:12:27 UTC (rev 40658)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c	2011-09-28 15:22:13 UTC (rev 40659)
@@ -889,11 +889,13 @@
 static EnumPropertyItem sequencer_prop_select_grouped_types[] = {
 	{1, "TYPE", 0, "Type", "Shared strip type"},
 	{2, "TYPE_BASIC", 0, "Global Type", "All strips of same basic type (Graphical or Sound)"},
-	{3, "TYPE_EFFECT", 0, "Effect Type", "Shared strip effect type (if active strip is not an effect one, select all non-effect strips)"},
+	{3, "TYPE_EFFECT", 0, "Effect Type",
+	    "Shared strip effect type (if active strip is not an effect one, select all non-effect strips)"},
 	{4, "DATA", 0, "Data", "Shared data (scene, image, sound, etc.)"},
 	{5, "EFFECT", 0, "Effect", "Shared effects"},
-	{6, "EFFECT_LINK", 0, "Effect/Linked", "Other strips affected by the active one (sharing some time, and below or effect-assigned)"},
-    {7, "OVERLAP", 0, "Overlap", "Overlapping time"},
+	{6, "EFFECT_LINK", 0, "Effect/Linked",
+	    "Other strips affected by the active one (sharing some time, and below or effect-assigned)"},
+	{7, "OVERLAP", 0, "Overlap", "Overlapping time"},
 	{0, NULL, 0, NULL, NULL}
 };
 
@@ -1033,7 +1035,7 @@
 
 static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
 {
-	Sequence *seq;
+	Sequence *seq = NULL;
 	short changed = FALSE;
 	short is_audio = ((actseq->type == SEQ_META) || SEQ_IS_SOUND(actseq));
 	int startdisp = actseq->startdisp;

Modified: trunk/blender/source/blender/gpu/intern/gpu_material.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_material.c	2011-09-28 14:12:27 UTC (rev 40658)
+++ trunk/blender/source/blender/gpu/intern/gpu_material.c	2011-09-28 15:22:13 UTC (rev 40659)
@@ -903,7 +903,7 @@
 	/*char *lastuvname = NULL;*/ /*UNUSED*/
 	float one = 1.0f, norfac, ofs[3];
 	int tex_nr, rgbnor, talpha;
-	int init_done = 0, iBumpSpacePrev;
+	int init_done = 0, iBumpSpacePrev = 0; /* Not necessary, quiting gcc warning. */
 	GPUNodeLink *vNorg, *vNacc, *fPrevMagnitude;
 	int iFirstTimeNMap=1;
 	int found_deriv_map = 0;

Modified: trunk/blender/source/blender/imbuf/intern/anim_movie.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/anim_movie.c	2011-09-28 14:12:27 UTC (rev 40658)
+++ trunk/blender/source/blender/imbuf/intern/anim_movie.c	2011-09-28 15:22:13 UTC (rev 40659)
@@ -900,8 +900,8 @@
 	long long st_time; 
 	struct anim_index * tc_index = 0;
 	AVStream * v_st;
-	int new_frame_index;
-	int old_frame_index;
+	int new_frame_index = 0; /* To quite gcc barking... */
+	int old_frame_index = 0; /* To quite gcc barking... */
 
 	if (anim == 0) return (0);
 

Modified: trunk/blender/source/blender/modifiers/intern/MOD_explode.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_explode.c	2011-09-28 14:12:27 UTC (rev 40658)
+++ trunk/blender/source/blender/modifiers/intern/MOD_explode.c	2011-09-28 15:22:13 UTC (rev 40659)
@@ -558,7 +558,9 @@
 	int *vertpa = MEM_callocN(sizeof(int)*totvert,"explode_vertpa2");
 	int *facepa = emd->facepa;
 	int *fs, totesplit=0,totfsplit=0,curdupface=0;
-	int i,j,v1,v2,v3,v4,esplit, v[4], uv[4];
+	int i,j,v1,v2,v3,v4,esplit,
+	    v[4]  = {0, 0, 0, 0}, /* To quite gcc barking... */
+	    uv[4] = {0, 0, 0, 0}; /* To quite gcc barking... */
 	int numlayer;
 
 	edgehash= BLI_edgehash_new();




More information about the Bf-blender-cvs mailing list