ref: 20c6ef4c25b6a4f1e8b284b1b0898c675f19a476
parent: e3a1c46768571ae6953db29da23fdaddbf448f99
author: Werner Lemberg <[email protected]>
date: Tue Jun 21 07:39:34 EDT 2016
[smooth] Remove compiler warnings. * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-20 Werner Lemberg <[email protected]>
+
+ [smooth] Remove compiler warnings.
+
+ * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
+
2016-06-20 Alexei Podtelezhnikov <[email protected]>
[smooth] Sanitize memory managenent.
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1940,21 +1940,21 @@
/* memory management */
{
- int ycount = band->max - band->min;
- int cell_start;
+ unsigned long ycount = (unsigned long)( band->max - band->min );
+ unsigned long cell_start;
- cell_start = ( ycount * sizeof( PCell ) + sizeof( TCell ) - 1 ) /
- sizeof( TCell );
+ cell_start = ( ycount * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) /
+ sizeof ( TCell );
if ( FT_MAX_GRAY_POOL - cell_start < 2 )
goto ReduceBands;
ras.cells = (PCell)ras.buffer + cell_start;
- ras.max_cells = FT_MAX_GRAY_POOL - cell_start;
+ ras.max_cells = (FT_PtrDist)( FT_MAX_GRAY_POOL - cell_start );
ras.ycells = (PCell*)ras.buffer;
- ras.ycount = ycount;
+ ras.ycount = (TPos)ycount;
while ( ycount )
ras.ycells[--ycount] = NULL;
}