* 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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
diff --git a/ChangeLog b/ChangeLog
index 4b0ede2..811e861 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 132c9ff..f2eb279 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -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() */
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 9f455b7..142ba07 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -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];
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index d3c9240..4b775e0 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -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 );
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index f69c113..8d144d0 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -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);
}
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 44e1fff..5b1568e 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -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;
diff --git a/src/pshinter/pshalgo2.c b/src/pshinter/pshalgo2.c
index 00778e2..5546bc9 100644
--- a/src/pshinter/pshalgo2.c
+++ b/src/pshinter/pshalgo2.c
@@ -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 )
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index ccb0174..4e5f9eb 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -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" ));
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index cb007a1..d87d70b 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -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;