ref: 01658be6fbda2ff17616158ae5df5dc240a4347c
parent: edf40148545038d07a394082caa1b9155941f88f
author: Werner Lemberg <[email protected]>
date: Thu Dec 15 18:10:59 EST 2016
Fix clang warnings. * src/cff/cffload.c (cff_blend_doBlend): Add cast. (cff_subfont_load): Set `error' correctly. * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-12-15 Werner Lemberg <[email protected]>
+
+ Fix clang warnings.
+
+ * src/cff/cffload.c (cff_blend_doBlend): Add cast.
+ (cff_subfont_load): Set `error' correctly.
+
+ * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
+
2016-12-15 Dave Arnold <[email protected]>
Werner Lemberg <[email protected]>
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1339,7 +1339,7 @@
/* CFF2 DICTs. See `cff_parse_num' for decode of this, which rounds */
/* to an integer. */
*subFont->blend_top++ = 255;
- *((FT_UInt32*)subFont->blend_top) = sum; /* write 4 bytes */
+ *((FT_UInt32*)subFont->blend_top) = (FT_UInt32)sum; /* write 4 bytes */
subFont->blend_top += 4;
}
@@ -1928,13 +1928,14 @@
/* Note: We use default stack size for CFF2 Font DICT because */
/* Top and Font DICTs are not allowed to have blend operators. */
- if ( cff_parser_init( &parser,
- code,
- &subfont->font_dict,
- font->library,
- stackSize,
- 0,
- 0 ) )
+ error = cff_parser_init( &parser,
+ code,
+ &subfont->font_dict,
+ font->library,
+ stackSize,
+ 0,
+ 0 );
+ if ( error )
goto Exit;
/* set defaults */
--- a/src/sfnt/ttmtx.c
+++ b/src/sfnt/ttmtx.c
@@ -308,8 +308,8 @@
var->lsb_adjust( f, gindex, &b );
}
- *aadvance = (FT_Short)a;
- *abearing = (FT_UShort)b;
+ *aadvance = (FT_UShort)a;
+ *abearing = (FT_Short)b;
}
#endif
}