shithub: freetype+ttf2subf

Download patch

ref: b34741c1cca65443de6ff7d46ef6ea8fd21a1e4d
parent: e34a860a07ce60ae23ee4c01cb3c8076dc24c2b7
author: Alexei Podtelezhnikov <[email protected]>
date: Thu Jan 27 17:55:34 EST 2022

Minor clean-ups.

* src/base/ftrfork.c (raccess_make_file_name): Do not set error.
* src/sfnt/sfdriver.c (get_win_string, get_apple_string): Ditto.
* src/cff/cffobjs.c (cff_strcpy): Do not confuse about error.
* src/psaux/psobjs.c (ps_table_done): Ditto.
* src/truetype/ttgxvar.c (ft_var_readpacked*, ft_var_load_avar): Ditto.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -868,9 +868,7 @@
     const char*  tmp;
     const char*  slash;
     size_t       new_length;
-    FT_Error     error = FT_Err_Ok;
-
-    FT_UNUSED( error );
+    FT_Error     error;
 
 
     new_length = ft_strlen( original_name ) + ft_strlen( insertion );
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -411,9 +411,7 @@
     FT_String*  result;
 
 
-    (void)FT_STRDUP( result, source );
-
-    FT_UNUSED( error );
+    FT_MEM_STRDUP( result, source );
 
     return result;
   }
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -258,8 +258,6 @@
 
     table->capacity = table->cursor;
     FT_FREE( old_base );
-
-    FT_UNUSED( error );
   }
 
 
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -495,7 +495,7 @@
                   char_type_func  char_type,
                   FT_Bool         report_invalid_characters )
   {
-    FT_Error  error = FT_Err_Ok;
+    FT_Error  error;
 
     char*       result = NULL;
     FT_String*  r;
@@ -502,9 +502,7 @@
     FT_Char*    p;
     FT_UInt     len;
 
-    FT_UNUSED( error );
 
-
     if ( FT_QALLOC( result, entry->stringLength / 2 + 1 ) )
       return NULL;
 
@@ -554,14 +552,12 @@
                     char_type_func  char_type,
                     FT_Bool         report_invalid_characters )
   {
-    FT_Error  error = FT_Err_Ok;
+    FT_Error  error;
 
     char*       result = NULL;
     FT_String*  r;
     FT_Char*    p;
     FT_UInt     len;
-
-    FT_UNUSED( error );
 
 
     if ( FT_QALLOC( result, entry->stringLength + 1 ) )
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -151,11 +151,9 @@
     FT_UInt    i, j;
     FT_UShort  first;
     FT_Memory  memory = stream->memory;
-    FT_Error   error  = FT_Err_Ok;
+    FT_Error   error;
 
-    FT_UNUSED( error );
 
-
     *point_cnt = 0;
 
     n = FT_GET_BYTE();
@@ -266,11 +264,9 @@
     FT_UInt    i, j;
     FT_UInt    bytes_used;
     FT_Memory  memory = stream->memory;
-    FT_Error   error  = FT_Err_Ok;
+    FT_Error   error;
 
-    FT_UNUSED( error );
 
-
     if ( FT_QNEW_ARRAY( deltas, delta_cnt ) )
       return NULL;
 
@@ -361,13 +357,11 @@
     FT_Memory       memory = stream->memory;
     GX_Blend        blend  = face->blend;
     GX_AVarSegment  segment;
-    FT_Error        error = FT_Err_Ok;
+    FT_Error        error;
     FT_Long         version;
     FT_Long         axisCount;
     FT_Int          i, j;
     FT_ULong        table_len;
-
-    FT_UNUSED( error );
 
 
     FT_TRACE2(( "AVAR " ));