summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2015-03-01 19:27:09 +0100
committerWerner Lemberg <wl@gnu.org>2015-03-01 19:27:09 +0100
commit851e815127d47e85a575e1be7ff8cc265d5d7e79 (patch)
tree707cb0d9639e43f6dbabab11221d59ba9bbc7454
parentbd133c352e262bd7faf9bab5a14980f02634552e (diff)
downloadfreetype2-851e815127d47e85a575e1be7ff8cc265d5d7e79.tar.gz
Various compiler warning fixes for `make multi'.
* src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges), src/autofit/aflatin.c (af_latin_hint_compute_blue_edges, af_latin_hint_edges), src/autofit/aflatin2.c (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare as `static'. * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH): Removed. Unused. * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H. * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused. * src/cff/cf2intrp.c: Include `cf2intrp.h'. * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused. * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused. * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'. * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX): Removed. Unused. * src/raster/ftraster.c (Render_Glyph): Declare as `static'. * src/sfnt/ttpost.c (load_format_20): Fix signedness warning. * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused. * src/truetype/ttsubpix.c (is_member_of_family_class, is_member_of_style_class): Declare as `static'. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare as `static'. * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as `static'. (T1_FIELD_COUNT): Removed. Unused. * src/type1/t1parse.h (T1_Done_Table): Removed. Unused. * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
-rw-r--r--ChangeLog42
-rw-r--r--src/autofit/afcjk.c2
-rw-r--r--src/autofit/aflatin.c4
-rw-r--r--src/autofit/aflatin2.c4
-rw-r--r--src/cache/ftccmap.c4
-rw-r--r--src/cache/ftcimage.c1
-rw-r--r--src/cache/ftcmanag.c2
-rw-r--r--src/cff/cf2intrp.c1
-rw-r--r--src/cff/cffdrivr.c8
-rw-r--r--src/gzip/ftgzip.c1
-rw-r--r--src/psaux/afmparse.c2
-rw-r--r--src/pshinter/pshalgo.c9
-rw-r--r--src/raster/ftraster.c2
-rw-r--r--src/sfnt/ttpost.c2
-rw-r--r--src/truetype/ttdriver.c8
-rw-r--r--src/truetype/ttsubpix.c4
-rw-r--r--src/type1/t1gload.c2
-rw-r--r--src/type1/t1load.c8
-rw-r--r--src/type1/t1parse.h6
-rw-r--r--src/type42/t42parse.c6
20 files changed, 57 insertions, 61 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f1be45d0..76d2168c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,47 @@
2015-02-25 Werner Lemberg <wl@gnu.org>
+ Various compiler warning fixes for `make multi'.
+
+ * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
+ src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
+ af_latin_hint_edges), src/autofit/aflatin2.c
+ (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
+ as `static'.
+
+ * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
+ Removed. Unused.
+ * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
+ * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
+
+ * src/cff/cf2intrp.c: Include `cf2intrp.h'.
+ * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
+
+ * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
+
+ * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
+
+ * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
+ Removed. Unused.
+
+ * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
+
+ * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
+
+ * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
+ * src/truetype/ttsubpix.c (is_member_of_family_class,
+ is_member_of_style_class): Declare as `static'.
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
+ as `static'.
+ * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
+ `static'.
+ (T1_FIELD_COUNT): Removed. Unused.
+ * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
+
+ * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
+
+2015-02-25 Werner Lemberg <wl@gnu.org>
+
[psaux] Signedness fixes.
* include/internal/psaux.h, src/psaux/afmparse.c,
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index 4268df800..3ce6b41b9 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -1190,7 +1190,7 @@
/* Compute all edges which lie within blue zones. */
- FT_LOCAL_DEF( void )
+ static void
af_cjk_hints_compute_blue_edges( AF_GlyphHints hints,
AF_CJKMetrics metrics,
AF_Dimension dim )
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index cc01ab549..a46321ffc 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1825,7 +1825,7 @@
/* Compute all edges which lie within blue zones. */
- FT_LOCAL_DEF( void )
+ static void
af_latin_hints_compute_blue_edges( AF_GlyphHints hints,
AF_LatinMetrics metrics )
{
@@ -2280,7 +2280,7 @@
/* The main grid-fitting routine. */
- FT_LOCAL_DEF( void )
+ static void
af_latin_hint_edges( AF_GlyphHints hints,
AF_Dimension dim )
{
diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c
index ac6de4c28..1560fb1d4 100644
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -1382,7 +1382,7 @@
}
- FT_LOCAL_DEF( void )
+ static void
af_latin2_hints_compute_blue_edges( AF_GlyphHints hints,
AF_LatinMetrics metrics )
{
@@ -1829,7 +1829,7 @@
/*************************************************************************/
- FT_LOCAL_DEF( void )
+ static void
af_latin2_hint_edges( AF_GlyphHints hints,
AF_Dimension dim )
{
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index 3b3052cdf..b8262220c 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -63,8 +63,6 @@
} FTC_CMapQueryRec, *FTC_CMapQuery;
#define FTC_CMAP_QUERY( x ) ((FTC_CMapQuery)(x))
-#define FTC_CMAP_QUERY_HASH( x ) \
- FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->char_code )
/* the cmap cache node */
typedef struct FTC_CMapNodeRec_
@@ -78,8 +76,6 @@
} FTC_CMapNodeRec, *FTC_CMapNode;
#define FTC_CMAP_NODE( x ) ( (FTC_CMapNode)( x ) )
-#define FTC_CMAP_NODE_HASH( x ) \
- FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->first )
/* if (indices[n] == FTC_CMAP_UNKNOWN), we assume that the corresponding */
/* glyph indices haven't been queried through FT_Get_Glyph_Index() yet */
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index 47e49393b..f519a6179 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -20,6 +20,7 @@
#include FT_CACHE_H
#include "ftcimage.h"
#include FT_INTERNAL_MEMORY_H
+#include FT_INTERNAL_OBJECTS_H
#include "ftccback.h"
#include "ftcerror.h"
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 5c526adaf..658614c8d 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -34,8 +34,6 @@
#undef FT_COMPONENT
#define FT_COMPONENT trace_cache
-#define FTC_LRU_GET_MANAGER( lru ) ( (FTC_Manager)(lru)->user_data )
-
static FT_Error
ftc_scaler_lookup_size( FTC_Manager manager,
diff --git a/src/cff/cf2intrp.c b/src/cff/cf2intrp.c
index fc8fc18a8..5ee4e5595 100644
--- a/src/cff/cf2intrp.c
+++ b/src/cff/cf2intrp.c
@@ -43,6 +43,7 @@
#include "cf2font.h"
#include "cf2stack.h"
#include "cf2hints.h"
+#include "cf2intrp.h"
#include "cf2error.h"
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 3f79854ee..8c12a5b58 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -64,11 +64,6 @@
/*************************************************************************/
-#undef PAIR_TAG
-#define PAIR_TAG( left, right ) ( ( (FT_ULong)left << 16 ) | \
- (FT_ULong)right )
-
-
/*************************************************************************/
/* */
/* <Function> */
@@ -121,9 +116,6 @@
}
-#undef PAIR_TAG
-
-
/*************************************************************************/
/* */
/* <Function> */
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index 74144d293..879eb88a7 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -58,7 +58,6 @@
/* conflicts when a program is linked with both FreeType and the */
/* original ZLib. */
-#define NO_DUMMY_DECL
#ifndef USE_ZLIB_ZCALLOC
#define MY_ZCALLOC /* prevent all zcalloc() & zfree() in zutils.c */
#endif
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index f13440f0c..0a868538a 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -562,7 +562,7 @@
}
- FT_LOCAL_DEF( FT_Error )
+ static FT_Error
afm_parser_read_int( AFM_Parser parser,
FT_Int* aint )
{
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index d04d1204c..1d3dedbc8 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -38,8 +38,6 @@
#define COMPUTE_INFLEXS /* compute inflection points to optimize `S' */
/* and similar glyphs */
-#define STRONGER /* slightly increase the contrast of smooth */
- /* hinting */
/*************************************************************************/
@@ -890,9 +888,6 @@
/*************************************************************************/
/*************************************************************************/
-#define PSH_ZONE_MIN -3200000L
-#define PSH_ZONE_MAX +3200000L
-
#define xxDEBUG_ZONES
@@ -910,10 +905,6 @@
zone->max );
}
-#else
-
-#define psh_print_zone( x ) do { } while ( 0 )
-
#endif /* DEBUG_ZONES */
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 317cd7db1..3291ba02d 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -2920,7 +2920,7 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- FT_LOCAL_DEF( FT_Error )
+ static FT_Error
Render_Glyph( RAS_ARG )
{
FT_Error error;
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index bf13a5c8d..92d231661 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -246,7 +246,7 @@
if ( len > post_limit ||
FT_STREAM_POS() > post_limit - len )
{
- FT_Int d = post_limit - FT_STREAM_POS();
+ FT_Int d = (FT_Int)post_limit - (FT_Int)FT_STREAM_POS();
FT_ERROR(( "load_format_20:"
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index a1516375e..043d0dfe2 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -134,11 +134,6 @@
/*************************************************************************/
-#undef PAIR_TAG
-#define PAIR_TAG( left, right ) ( ( (FT_ULong)left << 16 ) | \
- (FT_ULong)right )
-
-
/*************************************************************************/
/* */
/* <Function> */
@@ -191,9 +186,6 @@
}
-#undef PAIR_TAG
-
-
static FT_Error
tt_get_advances( FT_Face ttface,
FT_UInt start,
diff --git a/src/truetype/ttsubpix.c b/src/truetype/ttsubpix.c
index b31f36f92..dbda4d968 100644
--- a/src/truetype/ttsubpix.c
+++ b/src/truetype/ttsubpix.c
@@ -744,7 +744,7 @@
#endif /* FORCE_NATURAL_WIDTHS */
- FT_LOCAL_DEF( FT_Bool )
+ static FT_Bool
is_member_of_family_class( const FT_String* detected_font_name,
const FT_String* rule_font_name )
{
@@ -779,7 +779,7 @@
}
- FT_LOCAL_DEF( FT_Bool )
+ static FT_Bool
is_member_of_style_class( const FT_String* detected_font_style,
const FT_String* rule_font_style )
{
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 1547ad1d9..4af8d7193 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -54,7 +54,7 @@
/*************************************************************************/
- FT_LOCAL_DEF( FT_Error )
+ static FT_Error
T1_Parse_Glyph_And_Get_Char_String( T1_Decoder decoder,
FT_UInt glyph_index,
FT_Data* char_string )
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 25b66a497..66ed9cb92 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -226,7 +226,7 @@
/* Given a normalized (blend) coordinate, figure out the design */
/* coordinate appropriate for that value. */
/* */
- FT_LOCAL_DEF( FT_Fixed )
+ static FT_Fixed
mm_axis_unmap( PS_DesignMap axismap,
FT_Fixed ncv )
{
@@ -255,7 +255,7 @@
/* Given a vector of weights, one for each design, figure out the */
/* normalized axis coordinates which gave rise to those weights. */
/* */
- FT_LOCAL_DEF( void )
+ static void
mm_weights_unmap( FT_Fixed* weights,
FT_Fixed* axiscoords,
FT_UInt axis_count )
@@ -1843,10 +1843,6 @@
};
-#define T1_FIELD_COUNT \
- ( sizeof ( t1_keywords ) / sizeof ( t1_keywords[0] ) )
-
-
static FT_Error
parse_dict( T1_Face face,
T1_Loader loader,
diff --git a/src/type1/t1parse.h b/src/type1/t1parse.h
index ef8eef037..93b02e3d3 100644
--- a/src/type1/t1parse.h
+++ b/src/type1/t1parse.h
@@ -77,12 +77,6 @@ FT_BEGIN_HEADER
#define T1_Add_Table( p, i, o, l ) (p)->funcs.add( (p), i, o, l )
-#define T1_Done_Table( p ) \
- do \
- { \
- if ( (p)->funcs.done ) \
- (p)->funcs.done( p ); \
- } while ( 0 )
#define T1_Release_Table( p ) \
do \
{ \
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index 22684c9d2..d046408ae 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -104,12 +104,6 @@
#define T1_Add_Table( p, i, o, l ) (p)->funcs.add( (p), i, o, l )
-#define T1_Done_Table( p ) \
- do \
- { \
- if ( (p)->funcs.done ) \
- (p)->funcs.done( p ); \
- } while ( 0 )
#define T1_Release_Table( p ) \
do \
{ \