[smooth, raster] Fix signedness warning.

* src/smooth/ftgrays.c (gray_convert_glyph): Use unsigned estimate.
* src/raster/ftraster.c (ft_black_render): Ditto and expand.
This commit is contained in:
Alexei Podtelezhnikov 2026-05-12 19:14:54 -04:00
parent fae1e3160e
commit 3c364321ad
2 changed files with 7 additions and 6 deletions

View file

@ -2661,8 +2661,8 @@
const FT_Outline* outline = (const FT_Outline*)params->source;
const FT_Bitmap* target_map = params->target;
FT_Long estimate;
int ret;
FT_ULong estimate;
int ret;
#ifndef FT_STATIC_RASTER
black_TWorker worker[1];
@ -2712,7 +2712,8 @@
ras.bOrigin += ras.bTop * ras.bPitch;
/* allocate memory based on empirical estimate from CJK fonts */
estimate = ( ras.bTop + ras.bRight ) * 8L + 768L;
estimate = ( ras.bTop + ras.bRight ) * 8UL +
80UL * sizeof ( TProfile ) / sizeof ( Long );
if ( estimate > FT_MAX_BLACK_POOL )
{
FT_Error error;

View file

@ -1952,8 +1952,8 @@ typedef ptrdiff_t FT_PtrDist;
gray_raster_render( FT_Raster raster,
const FT_Raster_Params* params )
{
FT_Long estimate;
int ret;
FT_ULong estimate;
int ret;
const FT_Outline* outline = (const FT_Outline*)params->source;
const FT_Bitmap* target_map = params->target;
@ -2032,7 +2032,7 @@ typedef ptrdiff_t FT_PtrDist;
/* allocate memory based on empirical estimate from CJK fonts */
estimate = ( ras.cbox.xMax - ras.cbox.xMin +
ras.cbox.yMax - ras.cbox.yMin ) * 10;
ras.cbox.yMax - ras.cbox.yMin ) * 10UL;
if ( estimate > FT_MAX_GRAY_POOL )
{
FT_Error error;