diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2017-12-01 20:40:43 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2017-12-01 20:40:43 +0200 |
commit | d1dc7bcbd6b980cf072cba712b00117b337da3e8 (patch) | |
tree | 61f40c93e4a3bc7e2920126c12270f5b766f2534 | |
parent | 5ccfe0cf996f706697744e81e6a5707a6ac4df39 (diff) | |
download | pango-d1dc7bcbd6b980cf072cba712b00117b337da3e8.tar.gz |
Drop unused _pango_ft2_ft_strerror
This function is unused since 2004! Last use was dropped in commit
2cdd74591a2b885dbc31292d20dabba81d42faf0. Currently it is just causing
compiler warnings:
[40/111] Compiling C object 'pango/pangoft2-1.0@sha/pangoft2.c.o'.
/usr/include/freetype2/freetype/fterrdef.h: In function ‘_pango_ft2_ft_strerror’:
/usr/include/freetype2/freetype/fterrdef.h:235:17: warning: initializer-string for array of chars is too long
"found FDEF or IDEF opcode in glyf bytecode" )
^
../pango/pangoft2.c:537:38: note: in definition of macro ‘FT_ERRORDEF’
#define FT_ERRORDEF( e, v, s ) { e, s },
^
/usr/include/freetype2/freetype/fterrdef.h:234:3: note: in expansion of macro ‘FT_ERRORDEF_’
FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C,
^~~~~~~~~~~~
/usr/include/freetype2/freetype/fterrdef.h:235:17: note: (near initialization for ‘ft_errors[75].msg’)
"found FDEF or IDEF opcode in glyf bytecode" )
^
../pango/pangoft2.c:537:38: note: in definition of macro ‘FT_ERRORDEF’
#define FT_ERRORDEF( e, v, s ) { e, s },
^
/usr/include/freetype2/freetype/fterrdef.h:234:3: note: in expansion of macro ‘FT_ERRORDEF_’
FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C,
^~~~~~~~~~~~
-rw-r--r-- | pango/pangoft2-private.h | 1 | ||||
-rw-r--r-- | pango/pangoft2.c | 45 |
2 files changed, 0 insertions, 46 deletions
diff --git a/pango/pangoft2-private.h b/pango/pangoft2-private.h index 02d0a34b..7a81d40e 100644 --- a/pango/pangoft2-private.h +++ b/pango/pangoft2-private.h @@ -83,7 +83,6 @@ GType pango_ft2_font_get_type (void) G_GNUC_CONST; PangoFT2Font * _pango_ft2_font_new (PangoFT2FontMap *ft2fontmap, FcPattern *pattern); FT_Library _pango_ft2_font_map_get_library (PangoFontMap *fontmap); -const char *_pango_ft2_ft_strerror (FT_Error error); void _pango_ft2_font_map_default_substitute (PangoFcFontMap *fcfontmap, FcPattern *pattern); diff --git a/pango/pangoft2.c b/pango/pangoft2.c index 9372d530..0671a11b 100644 --- a/pango/pangoft2.c +++ b/pango/pangoft2.c @@ -517,51 +517,6 @@ pango_ft2_get_unknown_glyph (PangoFont *font) return PANGO_GLYPH_EMPTY; } -typedef struct -{ - FT_Error code; - const char msg[40]; -} ft_error_description; - -static int -ft_error_compare (const void *pkey, - const void *pbase) -{ - return ((ft_error_description *) pkey)->code - ((ft_error_description *) pbase)->code; -} - -const char * -_pango_ft2_ft_strerror (FT_Error error) -{ -#undef __FTERRORS_H__ -#define FT_ERRORDEF( e, v, s ) { e, s }, -#define FT_ERROR_START_LIST { -#define FT_ERROR_END_LIST }; - - static const ft_error_description ft_errors[] = -#include FT_ERRORS_H - -#undef FT_ERRORDEF -#undef FT_ERROR_START_LIST -#undef FT_ERROR_END_LIST - - ft_error_description *found = - bsearch (&error, ft_errors, G_N_ELEMENTS (ft_errors), - sizeof (ft_errors[0]), ft_error_compare); - if (found != NULL) - return found->msg; - else - { - static char *default_msg = NULL; /* MT-safe */ - - if (g_once_init_enter (&default_msg)) - g_once_init_leave (&default_msg, g_malloc (60)); - - g_sprintf (default_msg, "Unknown FreeType2 error %#x", error); - return default_msg; - } -} - void * _pango_ft2_font_get_cache_glyph_data (PangoFont *font, int glyph_index) |