[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43609] trunk/blender/source/blender/ blenkernel/intern/text.c: Quiet warnings in text editor

Campbell Barton ideasman42 at gmail.com
Sun Jan 22 18:27:03 CET 2012


Revision: 43609
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43609
Author:   campbellbarton
Date:     2012-01-22 17:26:56 +0000 (Sun, 22 Jan 2012)
Log Message:
-----------
Quiet warnings in text editor

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/text.c

Modified: trunk/blender/source/blender/blenkernel/intern/text.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/text.c	2012-01-22 17:20:37 UTC (rev 43608)
+++ trunk/blender/source/blender/blenkernel/intern/text.c	2012-01-22 17:26:56 UTC (rev 43609)
@@ -808,13 +808,14 @@
 void txt_move_up(Text *text, short sel)
 {
 	TextLine **linep;
-	int *charp, old;
+	int *charp;
+	/* int old; */ /* UNUSED */
 	
 	if (!text) return;
 	if(sel) txt_curs_sel(text, &linep, &charp);
 	else { txt_pop_first(text); txt_curs_cur(text, &linep, &charp); }
 	if (!*linep) return;
-	old= *charp;
+	/* old= *charp; */ /* UNUSED */
 
 	if((*linep)->prev) {
 		int index = txt_utf8_offset_to_index((*linep)->line, *charp);
@@ -834,13 +835,14 @@
 void txt_move_down(Text *text, short sel) 
 {
 	TextLine **linep;
-	int *charp, old;
+	int *charp;
+	/* int old; */ /* UNUSED */
 	
 	if (!text) return;
 	if(sel) txt_curs_sel(text, &linep, &charp);
 	else { txt_pop_last(text); txt_curs_cur(text, &linep, &charp); }
 	if (!*linep) return;
-	old= *charp;
+	/* old= *charp; */ /* UNUSED */
 
 	if((*linep)->next) {
 		int index = txt_utf8_offset_to_index((*linep)->line, *charp);
@@ -1897,6 +1899,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;



More information about the Bf-blender-cvs mailing list