[psaux] Fix MSVC compiler warnings. * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs): Add cast.
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
diff --git a/ChangeLog b/ChangeLog
index 2f087c6..496d803 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-06-02 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix MSVC compiler warnings.
+
+ * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
+ Add cast.
+
2021-05-29 Werner Lemberg <wl@gnu.org>
Fix compilation errors and (some) warnings for clang++.
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index 61f581f..0ad1760 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -622,7 +622,8 @@
/* Rough sanity check: The minimum line length of the `TrackKern` */
/* command is 20 characters (including the EOL character). */
- if ( ( stream->limit - stream->cursor ) / 20 < fi->NumTrackKern )
+ if ( (FT_ULong)( stream->limit - stream->cursor ) / 20 <
+ fi->NumTrackKern )
{
FT_ERROR(( "afm_parse_track_kern:"
" number of track kern entries exceeds stream size\n" ));
@@ -763,7 +764,8 @@
/* Rough sanity check: The minimum line length of the `KP`, */
/* `KPH`,`KPX`, and `KPY` commands is 10 characters (including */
/* the EOL character). */
- if ( ( stream->limit - stream->cursor ) / 10 < fi->NumKernPair )
+ if ( (FT_ULong)( stream->limit - stream->cursor ) / 10 <
+ fi->NumKernPair )
{
FT_ERROR(( "afm_parse_kern_pairs:"
" number of kern pairs exceeds stream size\n" ));