shithub: freetype+ttf2subf

Download patch

ref: f814f6823126114255a95632fcb74e842490a6a8
parent: 01152db10adecd1a0cf6f583950c1e17fc5ccdb7
author: Werner Lemberg <[email protected]>
date: Sun May 22 16:33:09 EDT 2005

* src/base/ftrfork.c (raccess_guess_apple_generic): Mark
`version_number' and `entry_length' as unused.
(raccess_guess_linux_double_from_file_name): Remove `memory'.
(raccess_make_file_name): Mark `error' as unused.

* src/bdf/bdflib.c (_bdf_parse_properties): Remove `memory'.

* src/cid/cidobjs.c (cid_face_init): Remove `psnames'.

* src/sfnt/sfobjs.c (sfnt_load_face): Remove `memory'.

* src/truetype/ttgxvar.c (ft_var_readpackedpoints,
ft_var_readpackeddeltas, ft_var_load_avar): Mark `error' as unused.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Embedded resource forks accessor (body).                             */
 /*                                                                         */
-/*  Copyright 2004 by                                                      */
+/*  Copyright 2004, 2005 by                                                */
 /*  Masatake YAMATO and Redhat K.K.                                        */
 /*                                                                         */
 /*  FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are     */
@@ -569,19 +569,21 @@
   {
     FT_Int32   magic_from_stream;
     FT_Error   error;
-    FT_Int32   version_number;
+    FT_Int32   version_number = 0;
     FT_UShort  n_of_entries;
 
     int        i;
-    FT_UInt32  entry_id, entry_offset, entry_length;
+    FT_UInt32  entry_id, entry_offset, entry_length = 0;
 
     const FT_UInt32  resource_fork_entry_id = 0x2;
 
     FT_UNUSED( library );
     FT_UNUSED( base_file_name );
+    FT_UNUSED( version_number );
+    FT_UNUSED( entry_length   );
 
 
-    if ( FT_READ_LONG ( magic_from_stream ) )
+    if ( FT_READ_LONG( magic_from_stream ) )
       return error;
     if ( magic_from_stream != magic )
       return FT_Err_Unknown_File_Format;
@@ -625,7 +627,6 @@
                                              char *      file_name,
                                              FT_Long    *result_offset )
   {
-    FT_Memory     memory;
     FT_Open_Args  args2;
     FT_Stream     stream2;
     char *        nouse = NULL;
@@ -632,8 +633,6 @@
     FT_Error      error;
 
 
-    memory = library->memory;
-
     args2.flags    = FT_OPEN_PATHNAME;
     args2.pathname = file_name;
     error = FT_Stream_New( library, &args2, &stream2 );
@@ -658,7 +657,10 @@
     char*        tmp;
     const char*  slash;
     unsigned     new_length;
-    FT_ULong     error;
+    FT_ULong     error = FT_Err_Ok;
+
+    FT_UNUSED( error );
+
 
     new_length = ft_strlen( original_name ) + ft_strlen( insertion );
     if ( FT_ALLOC( new_name, new_length + 1 ) )
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1847,7 +1847,6 @@
     char*              name;
     char*              value;
     char               nbuf[128];
-    FT_Memory          memory;
     FT_Error           error = BDF_Err_Ok;
 
     FT_UNUSED( lineno );
@@ -1855,8 +1854,6 @@
 
     next = (_bdf_line_func_t *)call_data;
     p    = (_bdf_parse_t *)    client_data;
-
-    memory = p->font->memory;
 
     /* Check for the end of the properties. */
     if ( ft_memcmp( line, "ENDPROPERTIES", 13 ) == 0 )
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID objects manager (body).                                          */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004 by                               */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005 by                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -298,11 +298,10 @@
                  FT_Int         num_params,
                  FT_Parameter*  params )
   {
-    CID_Face            face = (CID_Face)cidface;
-    FT_Error            error;
-    FT_Service_PsCMaps  psnames;
-    PSAux_Service       psaux;
-    PSHinter_Service    pshinter;
+    CID_Face          face = (CID_Face)cidface;
+    FT_Error          error;
+    PSAux_Service     psaux;
+    PSHinter_Service  pshinter;
 
     FT_UNUSED( num_params );
     FT_UNUSED( params );
@@ -310,8 +309,6 @@
 
 
     cidface->num_faces = 1;
-
-    FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
 
     psaux = (PSAux_Service)face->psaux;
     if ( !psaux )
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -529,10 +529,7 @@
     {
       FT_Face    root = &face->root;
       FT_Int32   flags = root->face_flags;
-      FT_Memory  memory;
 
-
-      memory = root->memory;
 
       /*********************************************************************/
       /*                                                                   */
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -134,9 +134,11 @@
     FT_Int     j;
     FT_Int     first;
     FT_Memory  memory = stream->memory;
-    FT_Error   error;
+    FT_Error   error = TT_Err_Ok;
 
+    FT_UNUSED( error );
 
+
     *point_cnt = n = FT_GET_BYTE();
     if ( n == 0 )
       return ALL_POINTS;
@@ -210,9 +212,11 @@
     FT_Int     i;
     FT_Int     j;
     FT_Memory  memory = stream->memory;
-    FT_Error   error;
+    FT_Error   error = TT_Err_Ok;
 
+    FT_UNUSED( error );
 
+
     if ( FT_NEW_ARRAY( deltas, delta_cnt ) )
       return NULL;
 
@@ -276,11 +280,13 @@
     FT_Memory       memory = stream->memory;
     GX_Blend        blend  = face->blend;
     GX_AVarSegment  segment;
-    FT_Error        error;
+    FT_Error        error = TT_Err_Ok;
     FT_ULong        version;
     FT_Long         axisCount;
     FT_Int          i, j;
     FT_ULong        table_len;
+
+    FT_UNUSED( error );
 
 
     blend->avar_checked = TRUE;