removed pedantic compiler warnings when the bytecode interpreter is compiled in the library
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
diff --git a/ChangeLog b/ChangeLog
index 44b7014..2ab12c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-07 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c, src/truetype/ttinterp.c, src/pcf/pcfread:
+ removed pedantic compiler warnings when the bytecode interpreter is
+ compiled in
+
2001-07-03 Werner Lemberg <wl@gnu.org>
* src/autohint/ahhint.c (ah_hinter_align_weak_points): Remove
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 4e25df3..eac265e 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -718,7 +718,7 @@ THE SOFTWARE.
else
encodingOffset = GET_ShortLE();
- if ( encodingOffset != (signed short)0xFFFF )
+ if ( encodingOffset != -1 )
{
tmpEncoding[j].enc = ( ( ( i / ( lastCol - firstCol + 1 ) ) +
firstRow ) * 256 ) +
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 6558f61..3f89fa7 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1046,7 +1046,7 @@
start_point, start_contour );
pts = &exec->pts;
- pts->n_points = num_points + 2;
+ pts->n_points = (short)(num_points + 2);
pts->n_contours = gloader->base.outline.n_contours;
/* add phantom points */
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 8ad09a7..6e1d85f 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -2294,12 +2294,14 @@
FT_Vector v;
FT_Angle angle;
+ FT_UNUSED_EXEC;
+
angle = FT_Atan2( Vx, Vy );
FT_Vector_Unit( &v, angle );
- R->x = v.x >> 2;
- R->y = v.y >> 2;
+ R->x = (short)(v.x >> 2);
+ R->y = (short)(v.y >> 2);
return SUCCESS;
}
@@ -3943,12 +3945,12 @@
break;
case 0x1B: /* ELSE */
- Out = ( nIfs == 1 );
+ Out = FT_BOOL( nIfs == 1 );
break;
case 0x59: /* EIF */
nIfs--;
- Out = ( nIfs == 0 );
+ Out = FT_BOOL( nIfs == 0 );
break;
}
} while ( Out == 0 );
@@ -4404,7 +4406,7 @@
FT_UShort L, K;
- L = (FT_UShort)CUR.opcode - 0xB0 + 1;
+ L = (FT_UShort)(CUR.opcode - 0xB0 + 1);
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
@@ -4429,7 +4431,7 @@
FT_UShort L, K;
- L = (FT_UShort)CUR.opcode - 0xB8 + 1;
+ L = (FT_UShort)(CUR.opcode - 0xB8 + 1);
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
@@ -4789,8 +4791,8 @@
if ( L != 0 )
L = K;
- CUR.GS.instruct_control =
- (FT_Byte)( CUR.GS.instruct_control & ~(FT_Byte)K ) | (FT_Byte)L;
+ CUR.GS.instruct_control = FT_BOOL(
+ ( (FT_Byte)CUR.GS.instruct_control & ~(FT_Byte)K ) | (FT_Byte)L );
}
@@ -5140,7 +5142,7 @@
if ( contour == 0 )
first_point = 0;
else
- first_point = CUR.pts.contours[contour - 1] + 1;
+ first_point = (FT_UShort)(CUR.pts.contours[contour - 1] + 1);
last_point = CUR.pts.contours[contour];
@@ -5149,7 +5151,7 @@
if ( last_point > CUR.zp2.n_points )
{
if ( CUR.zp2.n_points > 0 )
- last_point = CUR.zp2.n_points - 1;
+ last_point = (FT_UShort)(CUR.zp2.n_points - 1);
else
last_point = 0;
}
@@ -5191,7 +5193,7 @@
return;
if ( CUR.zp2.n_points > 0 )
- last_point = CUR.zp2.n_points - 1;
+ last_point = (FT_UShort)(CUR.zp2.n_points - 1);
else
last_point = 0;
@@ -6758,8 +6760,8 @@
FT_Short AA, BB;
- AA = (FT_Short)( opcode & 1 ) << 14;
- BB = AA ^ (FT_Short)0x4000;
+ AA = (FT_Short)(( opcode & 1 ) << 14);
+ BB = (FT_Short)( AA ^ 0x4000 );
if ( opcode < 4 )
{