[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43563] trunk/blender/source/blender: comment some dead assibnment and set dummy values for image profile conversion in case of invalid input .

Campbell Barton ideasman42 at gmail.com
Fri Jan 20 16:19:05 CET 2012


Revision: 43563
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43563
Author:   campbellbarton
Date:     2012-01-20 15:18:57 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------
comment some dead assibnment and set dummy values for image profile conversion in case of invalid input.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/key.c
    trunk/blender/source/blender/blenkernel/intern/text.c
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
    trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
    trunk/blender/source/blender/imbuf/intern/divers.c
    trunk/blender/source/blender/makesrna/intern/rna_tracking.c
    trunk/blender/source/blender/modifiers/intern/MOD_solidify.c

Modified: trunk/blender/source/blender/blenkernel/intern/key.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/key.c	2012-01-20 14:44:38 UTC (rev 43562)
+++ trunk/blender/source/blender/blenkernel/intern/key.c	2012-01-20 15:18:57 UTC (rev 43563)
@@ -377,7 +377,7 @@
 			if(k1->next==NULL) k[0]=k1;
 			k1=k1->next;
 		}
-		k1= k[1];
+		/* k1= k[1]; */ /* UNUSED */
 		t[0]= k[0]->pos;
 		t[1]+= dpos;
 		t[2]= k[2]->pos + dpos;

Modified: trunk/blender/source/blender/blenkernel/intern/text.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/text.c	2012-01-20 14:44:38 UTC (rev 43562)
+++ trunk/blender/source/blender/blenkernel/intern/text.c	2012-01-20 15:18:57 UTC (rev 43563)
@@ -1944,6 +1944,10 @@
 			break;
 		case 4: /* 32-bit unicode symbol */
 			unicode= txt_undo_read_uint32(undo_buf, undo_pos);
+		default:
+			/* should never happen */
+			BLI_assert(0);
+			unicode= 0;
 	}
 	
 	return unicode;

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c	2012-01-20 14:44:38 UTC (rev 43562)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c	2012-01-20 15:18:57 UTC (rev 43563)
@@ -3239,6 +3239,7 @@
 		/* re initialize */
 		project_int_noclip(ar, fp, mval);
 		flip= initgrabz(rv3d, fp[0], fp[1], fp[2]);
+		(void)flip;
 	}
 
 	if(mval[0]!=IS_CLIPPED) {

Modified: trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-01-20 14:44:38 UTC (rev 43562)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-01-20 15:18:57 UTC (rev 43563)
@@ -1067,7 +1067,7 @@
 	ghi = BLI_ghashIterator_new(edgeHash);
 	total_edges = 0;
 	/* fill the edges with data */
-	for(i = 0; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)){
+	for(; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)){
 		UvEdge *edge = ((UvEdge *)BLI_ghashIterator_getKey(ghi));
 		if(edge->flag & STITCH_BOUNDARY){
 			total_edges++;

Modified: trunk/blender/source/blender/imbuf/intern/divers.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/divers.c	2012-01-20 14:44:38 UTC (rev 43562)
+++ trunk/blender/source/blender/imbuf/intern/divers.c	2012-01-20 15:18:57 UTC (rev 43563)
@@ -645,15 +645,19 @@
 		profile_from = IB_PROFILE_LINEAR_RGB;
 	else if(ELEM(ibuf->profile, IB_PROFILE_SRGB, IB_PROFILE_NONE))
 		profile_from = IB_PROFILE_SRGB;
-	else
+	else {
 		BLI_assert(0);
+		profile_from = IB_PROFILE_SRGB; /* dummy, should never happen */
+	}
 
 	if(profile == IB_PROFILE_LINEAR_RGB)
 		profile_to = IB_PROFILE_LINEAR_RGB;
 	else if(ELEM(profile, IB_PROFILE_SRGB, IB_PROFILE_NONE))
 		profile_to = IB_PROFILE_SRGB;
-	else
+	else {
 		BLI_assert(0);
+		profile_to = IB_PROFILE_SRGB; /* dummy, should never happen */
+	}
 	
 	/* do conversion */
 	if(ibuf->rect_float) {

Modified: trunk/blender/source/blender/makesrna/intern/rna_tracking.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_tracking.c	2012-01-20 14:44:38 UTC (rev 43562)
+++ trunk/blender/source/blender/makesrna/intern/rna_tracking.c	2012-01-20 15:18:57 UTC (rev 43563)
@@ -1232,7 +1232,7 @@
 
 	func= RNA_def_function(srna, "remove", "rna_trackingObject_remove");
 	RNA_def_function_ui_description(func, "Remove tracking object from this movie clip");
-	parm= RNA_def_pointer(func, "object", "MovieTrackingObject", "", "Motion tracking object to be removed");
+	RNA_def_pointer(func, "object", "MovieTrackingObject", "", "Motion tracking object to be removed");
 
 	/* active object */
 	prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);

Modified: trunk/blender/source/blender/modifiers/intern/MOD_solidify.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_solidify.c	2012-01-20 14:44:38 UTC (rev 43562)
+++ trunk/blender/source/blender/modifiers/intern/MOD_solidify.c	2012-01-20 15:18:57 UTC (rev 43563)
@@ -583,7 +583,7 @@
 
 		/* faces */
 		mf= mface + (numFaces * 2);
-		origindex= result->getFaceDataArray(result, CD_ORIGINDEX);
+
 		for(i=0; i<newFaces; i++, mf++) {
 			int eidx= new_edge_arr[i];
 			int fidx= edge_users[eidx];



More information about the Bf-blender-cvs mailing list