[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43663] trunk/blender/source/blender/ editors: quiet some warnings & (possible/unlikely error)

Campbell Barton ideasman42 at gmail.com
Tue Jan 24 16:37:58 CET 2012


Revision: 43663
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43663
Author:   campbellbarton
Date:     2012-01-24 15:37:50 +0000 (Tue, 24 Jan 2012)
Log Message:
-----------
quiet some warnings & (possible/unlikely error)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_text/text_ops.c
    trunk/blender/source/blender/editors/space_time/space_time.c
    trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c

Modified: trunk/blender/source/blender/editors/space_text/text_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_text/text_ops.c	2012-01-24 13:17:32 UTC (rev 43662)
+++ trunk/blender/source/blender/editors/space_text/text_ops.c	2012-01-24 15:37:50 UTC (rev 43663)
@@ -2412,7 +2412,7 @@
 {
 	Text *text = st->text;
 	int max = wrap_width(st, ar); /* view */
-	int charp;                    /* mem */
+	int charp = -1;               /* mem */
 	int loop = 1, found = 0;      /* flags */
 	char ch;
 	
@@ -2513,9 +2513,11 @@
 		
 		y--;
 	}
-	
-	if(sel) { text->sell = linep; text->selc = charp; } 
-	else { text->curl = linep; text->curc = charp; }
+
+	if (linep && charp != -1) {
+		if(sel) { text->sell = linep; text->selc = charp; }
+		else { text->curl = linep; text->curc = charp; }
+	}
 }
 
 static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)

Modified: trunk/blender/source/blender/editors/space_time/space_time.c
===================================================================
--- trunk/blender/source/blender/editors/space_time/space_time.c	2012-01-24 13:17:32 UTC (rev 43662)
+++ trunk/blender/source/blender/editors/space_time/space_time.c	2012-01-24 15:37:50 UTC (rev 43663)
@@ -193,6 +193,10 @@
 				col[0] = 1.0;	col[1] = 0.1;	col[2] = 0.75;
 				col[3] = 0.1;
 				break;
+			default:
+				BLI_assert(0);
+				col[0] = 1.0;	col[1] = 0.0;	col[2] = 1.0;
+				col[3] = 0.1;
 		}
 		glColor4fv(col);
 		

Modified: trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-01-24 13:17:32 UTC (rev 43662)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-01-24 15:37:50 UTC (rev 43663)
@@ -565,7 +565,7 @@
 static int stitch_process_data(StitchState *state, Scene *scene, int final)
 {
 	int i;
-	StitchPreviewer *preview = uv_get_stitch_previewer();
+	StitchPreviewer *preview;
 	IslandStitchData *island_stitch_data = NULL;
 	int previous_island = state->static_island;
 	EditFace *efa;



More information about the Bf-blender-cvs mailing list