[pango] Drop unused _pango_ft2_ft_strerror
- From: Khaled Hosny <khaledh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Drop unused _pango_ft2_ft_strerror
- Date: Fri, 1 Dec 2017 18:44:02 +0000 (UTC)
commit d1dc7bcbd6b980cf072cba712b00117b337da3e8
Author: Khaled Hosny <khaledhosny eglug org>
Date: Fri Dec 1 20:40:43 2017 +0200
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,
^~~~~~~~~~~~
pango/pangoft2-private.h | 1 -
pango/pangoft2.c | 45 ---------------------------------------------
2 files changed, 0 insertions(+), 46 deletions(-)
---
diff --git a/pango/pangoft2-private.h b/pango/pangoft2-private.h
index 02d0a34..7a81d40 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 9372d53..0671a11 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]