ref: 2f1863cfb72f72fc9a454c8cb91cc711f56d01bd
parent: bec14f688925467be708f01378fbbf82e6b19b42
author: Tor Andersson <[email protected]>
date: Thu Nov 23 15:40:52 EST 2017
Silence unused function warnings. Some static function declarations cause unused function warnings if certain config options are turned off via `ftoption.h'. * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h, src/truetype/ttgxvar.h: Add #ifdef guards around these sections.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-11-23 Tor Andersson <[email protected]>
+
+ Silence unused function warnings.
+
+ Some static function declarations cause unused function warnings if
+ certain config options are turned off via `ftoption.h'.
+
+ * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h,
+ src/truetype/ttgxvar.h: Add #ifdef guards around these sections.
+
2017-11-22 Ewald Hew <[email protected]>
* src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting.
--- a/src/base/ftbase.h
+++ b/src/base/ftbase.h
@@ -2,7 +2,7 @@
/* */
/* ftbase.h */
/* */
-/* The FreeType private functions used in base module (specification). */
+/* Private functions used in the `base' module (specification). */
/* */
/* Copyright 2008-2017 by */
/* David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. */
@@ -27,6 +27,8 @@
FT_BEGIN_HEADER
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
+
/* MacOS resource fork cannot exceed 16MB at least for Carbon code; */
/* see https://support.microsoft.com/en-us/kb/130437 */
#define FT_MAC_RFORK_MAX_LEN 0x00FFFFFFUL
@@ -64,6 +66,8 @@
FT_LOCAL( FT_Bool )
ft_raccess_rule_by_darwin_vfs( FT_Library library, FT_UInt rule_index );
#endif
+
+#endif /* FT_CONFIG_OPTION_MAC_FONTS */
FT_END_HEADER
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -478,7 +478,7 @@
}
-#ifndef FT_MACINTOSH
+#if defined( FT_CONFIG_OPTION_MAC_FONTS ) && !defined( FT_MACINTOSH )
static FT_RFork_Rule
raccess_get_rule_type_from_rule_index( FT_Library library,
FT_UInt rule_index )
--- a/src/sfnt/ttbdf.h
+++ b/src/sfnt/ttbdf.h
@@ -28,6 +28,8 @@
FT_BEGIN_HEADER
+#ifdef TT_CONFIG_OPTION_BDF
+
FT_LOCAL( void )
tt_face_free_bdf_props( TT_Face face );
@@ -36,6 +38,8 @@
tt_face_find_bdf_prop( TT_Face face,
const char* property_name,
BDF_PropertyRec *aprop );
+
+#endif /* TT_CONFIG_OPTION_BDF */
FT_END_HEADER
--- a/src/truetype/ttgxvar.h
+++ b/src/truetype/ttgxvar.h
@@ -27,6 +27,8 @@
FT_BEGIN_HEADER
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -438,6 +440,8 @@
FT_LOCAL( void )
tt_done_blend( TT_Face face );
+
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
FT_END_HEADER