From ea460298bbb1322b990bf737fcd0f77fd535c097 Mon Sep 17 00:00:00 2001 From: Stephen Swaney Date: Fri, 14 Mar 2008 01:08:23 +0000 Subject: [PATCH] cleanup some warnings about signed vs unsigned comparison --- source/blender/src/drawtext.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index 8ef18ee954e..73b1aa9856c 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -194,7 +194,8 @@ void get_format_string(SpaceText *st) 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 @@ void convert_tabs (struct SpaceText *st, int tab) 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 @@ void convert_tabs (struct SpaceText *st, int tab) 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 @@ void convert_tabs (struct SpaceText *st, int tab) 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;