[sdf] Fix gcc compiler warnings.
* src/sdf/ftsdf.c, src/sdf/ftbsdf.c (*): Fix various compiler warnings, which were caused mainly due to unused variables and unused functions.
This commit is contained in:
parent
e0a2a76b09
commit
0db5ba974d
|
@ -1,3 +1,11 @@
|
|||
2020-08-13 Anuj Verma <anujv@iitbhilai.ac.in>
|
||||
|
||||
[sdf] Fix gcc compiler warnings.
|
||||
|
||||
* src/sdf/ftsdf.c, src/sdf/ftbsdf.c (*): Fix
|
||||
various compiler warnings, which were caused
|
||||
mainly due to unused variables and unused functions.
|
||||
|
||||
2020-08-13 Anuj Verma <anujv@iitbhilai.ac.in>
|
||||
|
||||
[sdf] Bug fix.
|
||||
|
|
|
@ -508,10 +508,8 @@
|
|||
BSDF_Worker* worker )
|
||||
{
|
||||
FT_Error error = FT_Err_Ok;
|
||||
FT_Bool is_monochrome = 0;
|
||||
|
||||
FT_Int x_diff, y_diff;
|
||||
FT_Int num_channels;
|
||||
FT_Int t_i, t_j, s_i, s_j;
|
||||
FT_Byte* s;
|
||||
ED* t;
|
||||
|
@ -782,9 +780,6 @@
|
|||
for ( j = 1; j < r; j++ )
|
||||
{
|
||||
FT_Int index;
|
||||
FT_16D16 dist;
|
||||
FT_16D16_Vec dist_vec;
|
||||
ED* to_check;
|
||||
ED* current;
|
||||
|
||||
|
||||
|
@ -859,9 +854,6 @@
|
|||
for ( j = r - 2; j >= 0; j-- )
|
||||
{
|
||||
FT_Int index;
|
||||
FT_16D16 dist;
|
||||
FT_16D16_Vec dist_vec;
|
||||
ED* to_check;
|
||||
ED* current;
|
||||
|
||||
|
||||
|
@ -963,8 +955,8 @@
|
|||
*
|
||||
*/
|
||||
static FT_Error
|
||||
finalize_sdf( BSDF_Worker* worker,
|
||||
FT_Bitmap* target )
|
||||
finalize_sdf( BSDF_Worker* worker,
|
||||
const FT_Bitmap* target )
|
||||
{
|
||||
FT_Error error = FT_Err_Ok;
|
||||
FT_Int w, r;
|
||||
|
@ -1092,17 +1084,17 @@
|
|||
bsdf_raster_render( FT_Raster raster,
|
||||
const FT_Raster_Params* params )
|
||||
{
|
||||
FT_Error error = FT_Err_Ok;
|
||||
FT_Bitmap* source = NULL;
|
||||
FT_Bitmap* target = NULL;
|
||||
FT_Memory memory = NULL;
|
||||
BSDF_TRaster* bsdf_raster = (BSDF_TRaster*)raster;
|
||||
BSDF_Worker worker;
|
||||
FT_Error error = FT_Err_Ok;
|
||||
const FT_Bitmap* source = NULL;
|
||||
const FT_Bitmap* target = NULL;
|
||||
FT_Memory memory = NULL;
|
||||
BSDF_TRaster* bsdf_raster = (BSDF_TRaster*)raster;
|
||||
BSDF_Worker worker;
|
||||
|
||||
const SDF_Raster_Params* sdf_params = (const SDF_Raster_Params*)params;
|
||||
|
||||
|
||||
FT_UNUSED( raster );
|
||||
worker.distance_map = NULL;
|
||||
|
||||
/* check for valid parameters */
|
||||
if ( !raster || !params )
|
||||
|
|
|
@ -2658,6 +2658,9 @@
|
|||
return error;
|
||||
}
|
||||
|
||||
/* `sdf_generate' is not used at the moment */
|
||||
#if 0
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @Function:
|
||||
|
@ -2891,6 +2894,8 @@
|
|||
return error;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @Function:
|
||||
|
@ -3059,10 +3064,7 @@
|
|||
else if ( dists[index].distance > dist.distance )
|
||||
dists[index] = dist;
|
||||
else if ( FT_ABS(dists[index].distance - dist.distance ) < CORNER_CHECK_EPSILON )
|
||||
{
|
||||
if ( FT_ABS( dists[index].cross ) < FT_ABS( dist.cross ) )
|
||||
dists[index] = dist;
|
||||
}
|
||||
dists[index] = resolve_corner( dists[index], dist );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3675,6 +3677,9 @@
|
|||
FT_Int line = __LINE__;
|
||||
|
||||
|
||||
/* in non debugging mode this is not used */
|
||||
FT_UNUSED( line );
|
||||
|
||||
*araster = 0;
|
||||
if ( !FT_ALLOC( raster, sizeof( SDF_TRaster ) ) )
|
||||
{
|
||||
|
@ -3819,6 +3824,8 @@
|
|||
FT_Memory memory = (FT_Memory)((SDF_TRaster*)raster)->memory;
|
||||
FT_Int line = __LINE__;
|
||||
|
||||
/* in non debugging mode this is not used */
|
||||
FT_UNUSED( line );
|
||||
|
||||
FT_FREE( raster );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue