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.
This commit is contained in:
Werner Lemberg 2016-12-15 23:10:59 +01:00
parent edf4014854
commit 01658be6fb
3 changed files with 20 additions and 10 deletions

View File

@ -1,3 +1,12 @@
2016-12-15 Werner Lemberg <wl@gnu.org>
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 <darnold@adobe.com>
Werner Lemberg <wl@gnu.org>

View File

@ -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 */

View File

@ -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
}