[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14104] trunk/blender/source/blender/src/ drawtext.c: cleanup some warnings about signed vs unsigned comparison

Stephen Swaney sswaney at centurytel.net
Fri Mar 14 02:08:24 CET 2008


Revision: 14104
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14104
Author:   stiv
Date:     2008-03-14 02:08:23 +0100 (Fri, 14 Mar 2008)

Log Message:
-----------
cleanup some warnings about signed vs unsigned comparison 

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawtext.c

Modified: trunk/blender/source/blender/src/drawtext.c
===================================================================
--- trunk/blender/source/blender/src/drawtext.c	2008-03-14 01:07:09 UTC (rev 14103)
+++ trunk/blender/source/blender/src/drawtext.c	2008-03-14 01:08:23 UTC (rev 14104)
@@ -194,7 +194,8 @@
 	char *in_line;
 	char format[2000], check[200], other[2];
 	unsigned char c;
-	int a, b, len, spot, letter, tabs, mem_amount;
+	int spot, letter, tabs, mem_amount;
+	size_t a, b, len;
 	
 	if(!text) return;
 	tmp = text->lines.first;
@@ -2149,7 +2150,8 @@
 	Text *text = st->text;
 	TextLine *tmp;
 	char *check_line, *new_line, *format;
-	int a, j, extra, number; //unknown for now
+	int extra, number; //unknown for now
+	size_t a, j;
 	
 	if (!text) return;
 	
@@ -2199,7 +2201,7 @@
 			extra = 0;
 			for (a = 0; a < strlen(check_line); a++) {
 				number = 0;
-				for (j = 0; j < st->tabnumber; j++) {
+				for (j = 0; j < (size_t)st->tabnumber; j++) {
 					if ((a+j) <= strlen(check_line)) { //check to make sure we are not pass the end of the line
 						if(check_line[a+j] != ' ') {
 							number = 1;
@@ -2218,7 +2220,7 @@
 				extra = 0; //reuse vars
 				for (a = 0; a < strlen(check_line); a++) {
 					number = 0;
-					for (j = 0; j < st->tabnumber; j++) {
+					for (j = 0; j < (size_t)st->tabnumber; j++) {
 						if ((a+j) <= strlen(check_line)) { //check to make sure we are not pass the end of the line
 							if(check_line[a+j] != ' ') {
 								number = 1;





More information about the Bf-blender-cvs mailing list