summaryrefslogtreecommitdiff
path: root/src/sfnt/ttsbit.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2014-02-08 13:55:38 +0100
committerWerner Lemberg <wl@gnu.org>2014-02-08 13:55:38 +0100
commit7be2a94a50109773459414687151d70a99a1b6bd (patch)
tree2609ae858ef354bbd42c019440692529764ee3d5 /src/sfnt/ttsbit.c
parentab98c5e73b4c4a6eed88dbc6338225012cd72a3e (diff)
downloadfreetype2-7be2a94a50109773459414687151d70a99a1b6bd.tar.gz
Fix clang static analyzer and compiler warnings.
* src/autofit/afhints.c (af_glyph_hints_align_weak_points), src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>, src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style), src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load), src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next, tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead code. * src/autofit/afmodule.c (af_property_get_face_globals, af_property_set, af_property_get), src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Make functions static. * src/base/ftobjs.c (ft_remove_renderer): Protect against library == NULL. (ft_property_do): Make function static. * src/base/ftrfork.c: Include `ftbase.h'. * src/sfnt/ttsbit.c (tt_face_load_sbix_image) [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c (T1_Compute_Max_Advance): Avoid compiler warning. * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of variable.
Diffstat (limited to 'src/sfnt/ttsbit.c')
-rw-r--r--src/sfnt/ttsbit.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index c118894a4..8ff7b9d6a 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -1247,11 +1247,11 @@
FT_Bitmap *map,
TT_SBit_MetricsRec *metrics )
{
- FT_UInt sbix_pos, strike_offset, glyph_start, glyph_end;
- FT_ULong table_size, data_size;
- FT_Int originOffsetX, originOffsetY;
- FT_Tag graphicType;
- FT_Int recurse_depth = 0;
+ FT_UInt sbix_pos, strike_offset, glyph_start, glyph_end;
+ FT_ULong table_size;
+ FT_Int originOffsetX, originOffsetY;
+ FT_Tag graphicType;
+ FT_Int recurse_depth = 0;
FT_Error error;
FT_Byte* p;
@@ -1302,7 +1302,6 @@
originOffsetY = FT_GET_SHORT();
graphicType = FT_GET_TAG4();
- data_size = glyph_end - glyph_start - 8;
switch ( graphicType )
{
@@ -1326,7 +1325,7 @@
metrics,
stream->memory,
stream->cursor,
- data_size,
+ glyph_end - glyph_start - 8,
TRUE );
#else
error = FT_THROW( Unimplemented_Feature );