diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-05-28 18:52:28 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-05-28 18:52:28 +0400 |
commit | 5ca36915a6fe5f2aa2f544aa99216ee0dc48014f (patch) | |
tree | 3163baad5e9660c5af26589c117a69ebea64e363 /source/blender/blenkernel | |
parent | 628a8151daa713592f03221571a230c55ba535a9 (diff) |
Silence some unused-but-set-variable warnings.
And small optimization for text search function :)
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index c9862ec3ede..da329503c9f 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -238,7 +238,7 @@ static void cleanup_textline(TextLine * tl) int reopen_text(Text *text) { FILE *fp; - int i, llen, len, res; + int i, llen, len; unsigned char *buffer; TextLine *tmp; char str[FILE_MAXDIR+FILE_MAXFILE]; @@ -281,7 +281,7 @@ int reopen_text(Text *text) fclose(fp); - res= stat(str, &st); + stat(str, &st); text->mtime= st.st_mtime; text->nlines=0; @@ -334,7 +334,7 @@ Text *add_text(const char *file, const char *relpath) { Main *bmain= G.main; FILE *fp; - int i, llen, len, res; + int i, llen, len; unsigned char *buffer; TextLine *tmp; Text *ta; @@ -374,7 +374,7 @@ Text *add_text(const char *file, const char *relpath) fclose(fp); - res= stat(str, &st); + stat(str, &st); ta->mtime= st.st_mtime; ta->nlines=0; @@ -1236,14 +1236,11 @@ int txt_find_string(Text *text, char *findstr, int wrap, int match_case) { TextLine *tl, *startl; char *s= NULL; - int oldcl, oldsl; if (!text || !text->curl || !text->sell) return 0; txt_order_cursors(text); - oldcl= txt_get_span(text->lines.first, text->curl); - oldsl= txt_get_span(text->lines.first, text->sell); tl= startl= text->sell; if(match_case) s= strstr(&tl->line[text->selc], findstr); |