[cache] Remove some casts, clean up tracing.

* src/cache/ftcbasic.c (FTC_ImageCache_Lookup, FTC_SBitCache_Lookup):
Clean up tracing types.
* src/cache/ftccache.c (ftc_node_destroy): Ditto.
* src/cache/ftcmanag.c (FTC_Manager_Check): Ditto.
(FTC_Manager_Check, FTC_Node_Unref): Remove a cast.
* src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
This commit is contained in:
Alexei Podtelezhnikov 2022-08-01 20:19:12 -04:00
parent a18ad83e8b
commit 039b9071f3
4 changed files with 11 additions and 11 deletions

View File

@ -320,7 +320,7 @@
#if 0xFFFFFFFFUL > FT_UINT_MAX
if ( (type->flags & (FT_ULong)FT_UINT_MAX) )
FT_TRACE1(( "FTC_ImageCache_Lookup:"
" higher bits in load_flags 0x%x are dropped\n",
" higher bits in load_flags 0x%lx are dropped\n",
(FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) ));
#endif
@ -518,7 +518,7 @@
#if 0xFFFFFFFFUL > FT_UINT_MAX
if ( (type->flags & (FT_ULong)FT_UINT_MAX) )
FT_TRACE1(( "FTC_ImageCache_Lookup:"
" higher bits in load_flags 0x%x are dropped\n",
" higher bits in load_flags 0x%lx are dropped\n",
(FT_ULong)type->flags & ~((FT_ULong)FT_UINT_MAX) ));
#endif

View File

@ -307,7 +307,7 @@
#if 0
/* check, just in case of general corruption :-) */
if ( manager->num_nodes == 0 )
FT_TRACE0(( "ftc_node_destroy: invalid cache node count (%d)\n",
FT_TRACE0(( "ftc_node_destroy: invalid cache node count (%u)\n",
manager->num_nodes ));
#endif
}

2
src/cache/ftccmap.c vendored
View File

@ -295,7 +295,7 @@
if ( error )
goto Exit;
if ( (FT_UInt)cmap_index < (FT_UInt)face->num_charmaps )
if ( cmap_index < face->num_charmaps )
{
FT_CharMap old, cmap = NULL;

14
src/cache/ftcmanag.c vendored
View File

@ -488,8 +488,8 @@
FTC_Cache cache = manager->caches[node->cache_index];
if ( (FT_UInt)node->cache_index >= manager->num_caches )
FT_TRACE0(( "FTC_Manager_Check: invalid node (cache index = %ld\n",
if ( node->cache_index >= manager->num_caches )
FT_TRACE0(( "FTC_Manager_Check: invalid node (cache index = %hu\n",
node->cache_index ));
else
weight += cache->clazz.node_weight( node, cache );
@ -519,7 +519,7 @@
if ( count != manager->num_nodes )
FT_TRACE0(( "FTC_Manager_Check:"
" invalid cache node count %d instead of %d\n",
" invalid cache node count %u instead of %u\n",
manager->num_nodes, count ));
}
}
@ -547,7 +547,7 @@
#ifdef FT_DEBUG_ERROR
FTC_Manager_Check( manager );
FT_TRACE0(( "compressing, weight = %ld, max = %ld, nodes = %d\n",
FT_TRACE0(( "compressing, weight = %ld, max = %ld, nodes = %u\n",
manager->cur_weight, manager->max_weight,
manager->num_nodes ));
#endif
@ -693,9 +693,9 @@
FTC_Node_Unref( FTC_Node node,
FTC_Manager manager )
{
if ( node &&
manager &&
(FT_UInt)node->cache_index < manager->num_caches )
if ( node &&
manager &&
node->cache_index < manager->num_caches )
node->ref_count--;
}