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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
diff --git a/src/base/ftrfork.c b/src/base/ftrfork.c
index 954df1a..7fe4146 100644
--- 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 );
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 6ced6cd..fa42acc 100644
--- 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;
}
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 323c43b..4ee5287 100644
--- 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 );
}
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 9115b6d..cc121e5 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -495,15 +495,13 @@
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 / 2 + 1 ) )
return NULL;
@@ -554,15 +552,13 @@
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 ) )
return NULL;
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 1d4fb28..2a7f917 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -151,9 +151,7 @@
FT_UInt i, j;
FT_UShort first;
FT_Memory memory = stream->memory;
- FT_Error error = FT_Err_Ok;
-
- FT_UNUSED( error );
+ FT_Error error;
*point_cnt = 0;
@@ -266,9 +264,7 @@
FT_UInt i, j;
FT_UInt bytes_used;
FT_Memory memory = stream->memory;
- FT_Error error = FT_Err_Ok;
-
- FT_UNUSED( error );
+ FT_Error error;
if ( FT_QNEW_ARRAY( deltas, delta_cnt ) )
@@ -361,14 +357,12 @@
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 " ));