* src/base/ftobjs.c, src/base/ftoutln.c, src/cache/ftccmap.c,

src/cff/cffload.c, src/cff/cffobjs.c, src/pshinter/pshalgo2.c,
        src/sfnt/ttload.c, src/sfnt/ttsbit.c: removing small compiler
        warnings (in pedantic compilation modes)
This commit is contained in:
David Turner 2002-01-07 10:04:09 +00:00
parent ac812959bb
commit f86709a15b
9 changed files with 32 additions and 22 deletions

View File

@ -1,3 +1,11 @@
2002-01-06 David Turner <david@freetype.org>
* src/base/ftobjs.c, src/base/ftoutln.c, src/cache/ftccmap.c,
src/cff/cffload.c, src/cff/cffobjs.c, src/pshinter/pshalgo2.c,
src/sfnt/ttload.c, src/sfnt/ttsbit.c: removing small compiler
warnings (in pedantic compilation modes)
2002-01-05 David Turner <david@freetype.org>
* src/autohint/ahhint.c (ah_align_linked_edge): Modified computation

View File

@ -23,6 +23,7 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TABLES_H
#include FT_OUTLINE_H
#include <string.h> /* for strcmp() */

View File

@ -319,8 +319,7 @@
if ( n_points <= 0 || n_contours <= 0 )
goto Bad;
end0 = -1;
end = end0;
end0 = end = -1;
for ( n = 0; n < n_contours; n++ )
{
end = outline->contours[n];

6
src/cache/ftccmap.c vendored
View File

@ -130,6 +130,8 @@
FT_CALLBACK_DEF( FT_ULong )
ftc_cmap_node_weight( FTC_CMapNode cnode )
{
FT_UNUSED(cnode);
return sizeof ( *cnode );
}
@ -142,7 +144,7 @@
FT_UInt32 offset = (FT_UInt32)( cquery->char_code - cnode->first );
return ( offset < FTC_CMAP_INDICES_MAX );
return FT_BOOL( offset < FTC_CMAP_INDICES_MAX );
}
@ -373,7 +375,7 @@
/* perform lookup */
gindex = FT_Get_Char_Index( face, char_code );
node->indices[offset] = gindex;
node->indices[offset] = (FT_UInt16) gindex;
/* restore old charmap */
FT_Set_Charmap( face, old );

View File

@ -1049,7 +1049,7 @@
FT_LOCAL_DEF FT_UShort
CFF_Get_Standard_Encoding( FT_UInt charcode )
{
return (charcode < 256 ? cff_standard_encoding[charcode] : 0);
return (FT_UShort)(charcode < 256 ? cff_standard_encoding[charcode] : 0);
}

View File

@ -120,34 +120,34 @@
count = priv.num_blue_values = cpriv->num_blue_values;
for ( n = 0; n < count; n++ )
priv.blue_values[n] = cpriv->blue_values[n];
priv.blue_values[n] = (FT_Short) cpriv->blue_values[n];
count = priv.num_other_blues = cpriv->num_other_blues;
for ( n = 0; n < count; n++ )
priv.other_blues[n] = cpriv->other_blues[n];
priv.other_blues[n] = (FT_Short) cpriv->other_blues[n];
count = priv.num_family_blues = cpriv->num_family_blues;
for ( n = 0; n < count; n++ )
priv.family_blues[n] = cpriv->family_blues[n];
priv.family_blues[n] = (FT_Short) cpriv->family_blues[n];
count = priv.num_family_other_blues = cpriv->num_family_other_blues;
for ( n = 0; n < count; n++ )
priv.family_other_blues[n] = cpriv->family_other_blues[n];
priv.family_other_blues[n] = (FT_Short) cpriv->family_other_blues[n];
priv.blue_scale = cpriv->blue_scale;
priv.blue_shift = cpriv->blue_shift;
priv.blue_fuzz = cpriv->blue_fuzz;
priv.standard_width[0] = (FT_UShort)cpriv->standard_width;
priv.standard_height[0] = (FT_UShort)cpriv->standard_height;
priv.standard_width[0] = (FT_UShort) cpriv->standard_width;
priv.standard_height[0] = (FT_UShort) cpriv->standard_height;
count = priv.num_snap_widths = cpriv->num_snap_widths;
for ( n = 0; n < count; n++ )
priv.snap_widths[n] = cpriv->snap_widths[n];
priv.snap_widths[n] = (FT_Short) cpriv->snap_widths[n];
count = priv.num_snap_heights = cpriv->num_snap_heights;
for ( n = 0; n < count; n++ )
priv.snap_heights[n] = cpriv->snap_heights[n];
priv.snap_heights[n] = (FT_Short) cpriv->snap_heights[n];
priv.force_bold = cpriv->force_bold;
priv.language_group = cpriv->language_group;

View File

@ -1044,7 +1044,7 @@
vec[n].y = point->cur_u;
if ( psh2_point_is_strong( point ) )
tags[n] |= (dimension == 0) ? 32 : 64;
tags[n] |= (char)((dimension == 0) ? 32 : 64);
#ifdef DEBUG_HINTER
if ( dimension == 0 )

View File

@ -649,8 +649,8 @@
/* We also increase maxPoints and maxContours in order to support */
/* some broken fonts. */
face->root.internal->max_points += 8;
face->root.internal->max_contours += 4;
face->root.internal->max_points += (FT_UShort) 8;
face->root.internal->max_contours += (FT_Short) 4;
}
FT_TRACE2(( "MAXP loaded.\n" ));

View File

@ -123,7 +123,7 @@
/* ensure that there are at least 8 bits in the accumulator */
if ( loaded < 8 )
{
acc |= (FT_UShort)*source++ << ( 8 - loaded );
acc |= (FT_UShort)((FT_UShort)*source++ << ( 8 - loaded ));
loaded += 8;
}
@ -131,8 +131,8 @@
val = (FT_Byte)( acc >> 8 );
if ( shift )
{
cur[0] |= val >> shift;
cur[1] |= val << space;
cur[0] |= (FT_Byte)(val >> shift);
cur[1] |= (FT_Byte)(val << space);
}
else
cur[0] |= val;
@ -158,16 +158,16 @@
/* ensure that there are at least `count' bits in the accumulator */
if ( (FT_Int)loaded < count )
{
acc |= (FT_UShort)*source++ << ( 8 - loaded );
acc |= (FT_UShort)((FT_UShort)*source++ << ( 8 - loaded ));
loaded += 8;
}
/* now write remaining bits */
val = (FT_Byte)( ( (FT_Byte)( acc >> 8 ) ) & ~( 0xFF >> count ) );
cur[0] |= val >> shift;
cur[0] |= (FT_Byte)(val >> shift);
if ( count > space )
cur[1] |= val << space;
cur[1] |= (FT_Byte)(val << space);
acc <<= count;
loaded -= count;