summaryrefslogtreecommitdiff
path: root/src/pfr
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2013-08-01 12:20:20 +0200
committerWerner Lemberg <wl@gnu.org>2013-08-01 12:20:20 +0200
commite8ed2d621e4182956488ce15c5611472345e63be (patch)
tree216c5fb83b56024957364c9498be374246087809 /src/pfr
parent72f5ff5bbb6f3467baf13e4c014f3f50479e3b96 (diff)
downloadfreetype2-e8ed2d621e4182956488ce15c5611472345e63be.tar.gz
Another round of cppcheck nitpicks.
The call was (from the top-level of the FreeType tree): cppcheck --force \ --enable=all \ -I /usr/include \ -I /usr/local/include \ -I /usr/lib/gcc/i586-suse-linux/4.7/include \ -I include \ -I include/freetype \ -I include/freetype/config \ -I include/freetype/internal \ -DFT2_BUILD_LIBRARY \ . &> cppcheck.log using cppcheck git commit f7e93f99. Note that cppcheck still can't handle `#include FOO' (with `FOO' a macro). */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/gxvalid/*: Comment out redundant code or guard it with FT_DEBUG_LEVEL_TRACE.
Diffstat (limited to 'src/pfr')
-rw-r--r--src/pfr/pfrcmap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pfr/pfrcmap.c b/src/pfr/pfrcmap.c
index 740c433d6..1f05640cc 100644
--- a/src/pfr/pfrcmap.c
+++ b/src/pfr/pfrcmap.c
@@ -67,14 +67,16 @@
pfr_cmap_char_index( PFR_CMap cmap,
FT_UInt32 char_code )
{
- FT_UInt min = 0;
- FT_UInt max = cmap->num_chars;
- FT_UInt mid;
- PFR_Char gchar;
+ FT_UInt min = 0;
+ FT_UInt max = cmap->num_chars;
while ( min < max )
{
+ PFR_Char gchar;
+ FT_UInt mid;
+
+
mid = min + ( max - min ) / 2;
gchar = cmap->chars + mid;