diff options
author | Werner Lemberg <wl@gnu.org> | 2021-06-02 06:36:11 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2021-06-02 06:36:11 +0200 |
commit | 0abbc9f5122496d94d7364dfd9fe4e2a0b30b938 (patch) | |
tree | 5df860869835789b272a245e2188bc92de6db160 | |
parent | 6e253b26b2889cfff817b966c95e112bda050298 (diff) | |
download | freetype2-0abbc9f5122496d94d7364dfd9fe4e2a0b30b938.tar.gz |
[psaux] Fix MSVC compiler warnings.
* src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
Add cast.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/psaux/afmparse.c | 6 |
2 files changed, 11 insertions, 2 deletions
@@ -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 61f581fa9..0ad176051 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" )); |