ref: 87628724a9a5d4e1caf5574a2a32f0c205445770
parent: 23367ff97f33ef6a2b7e1fced1157c87a46d9596
author: Sean McBride <[email protected]>
date: Tue Mar 18 04:39:35 EDT 2014
Fix clang warnings. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize some variables. * src/base/ftcalc.c (FT_MulFix): Only use code if `FT_MULFIX_INLINED' is not defined. * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class), src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make function static. * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant code.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2014-03-18 Sean McBride <[email protected]>
+ Werner Lemberg <[email protected]>
+
+ Fix clang warnings.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
+ some variables.
+
+ * src/base/ftcalc.c (FT_MulFix): Only use code if
+ `FT_MULFIX_INLINED' is not defined.
+
+ * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
+ (ftc_basic_image_family_class, ftc_basic_image_cache_class,
+ ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
+ src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
+ (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
+ (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
+ function static.
+
+ * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
+ code.
+
2014-03-17 Werner Lemberg <[email protected]>
Fix Savannah bug #41869.
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -552,7 +552,8 @@
{
FT_Bool l2r;
FT_Pos d;
- FT_Int p_first, p_last;
+ FT_Int p_first = 0; /* pacify clang compiler */
+ FT_Int p_last = 0;
if ( !hit )
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -39,9 +39,6 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
-#ifdef FT_MULFIX_INLINED
-#undef FT_MulFix
-#endif
/* we need to emulate a 64-bit data type if a real one isn't available */
@@ -203,6 +200,8 @@
/* documentation is in freetype.h */
+#ifndef FT_MULFIX_INLINED
+
FT_EXPORT_DEF( FT_Long )
FT_MulFix( FT_Long a,
FT_Long b )
@@ -236,7 +235,9 @@
#endif /* FT_MULFIX_ASSEMBLER */
}
+#endif /* FT_MULFIX_INLINED */
+
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Long )
@@ -447,6 +448,8 @@
/* documentation is in freetype.h */
+#ifndef FT_MULFIX_INLINED
+
FT_EXPORT_DEF( FT_Long )
FT_MulFix( FT_Long a,
FT_Long b )
@@ -544,6 +547,8 @@
#endif /* 0 */
}
+
+#endif /* FT_MULFIX_INLINED */
/* documentation is in freetype.h */
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -182,7 +182,7 @@
}
- FT_CALLBACK_TABLE_DEF
+ static
const FT_CMap_ClassRec bdf_cmap_class =
{
sizeof ( BDF_CMapRec ),
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType basic cache interface (body). */
/* */
-/* Copyright 2003-2007, 2009-2011, 2013 by */
+/* Copyright 2003-2007, 2009-2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -229,7 +229,7 @@
*
*/
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_IFamilyClassRec ftc_basic_image_family_class =
{
{
@@ -243,7 +243,7 @@
};
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_GCacheClassRec ftc_basic_image_cache_class =
{
{
@@ -415,7 +415,7 @@
*
*/
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_SFamilyClassRec ftc_basic_sbit_family_class =
{
{
@@ -430,7 +430,7 @@
};
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_GCacheClassRec ftc_basic_sbit_cache_class =
{
{
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -4,7 +4,7 @@
/* */
/* FreeType CharMap cache (body) */
/* */
-/* Copyright 2000-2013 by */
+/* Copyright 2000-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -202,7 +202,7 @@
/*************************************************************************/
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_CacheClassRec ftc_cmap_cache_class =
{
ftc_cmap_node_new,
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (body). */
/* */
-/* Copyright 2000-2006, 2008-2010, 2013 by */
+/* Copyright 2000-2006, 2008-2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -151,7 +151,7 @@
}
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_MruListClassRec ftc_size_list_class =
{
sizeof ( FTC_SizeNodeRec ),
@@ -290,7 +290,7 @@
}
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_MruListClassRec ftc_face_list_class =
{
sizeof ( FTC_FaceNodeRec),
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -2,7 +2,7 @@
FreeType font driver for pcf files
- Copyright (C) 2000-2004, 2006-2011, 2013 by
+ Copyright (C) 2000-2004, 2006-2011, 2013, 2014 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -189,7 +189,7 @@
}
- FT_CALLBACK_TABLE_DEF
+ static
const FT_CMap_ClassRec pcf_cmap_class =
{
sizeof ( PCF_CMapRec ),
--- a/src/pfr/pfrdrivr.c
+++ b/src/pfr/pfrdrivr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR driver interface (body). */
/* */
-/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013 by */
+/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -134,7 +134,7 @@
}
- FT_CALLBACK_TABLE_DEF
+ static
const FT_Service_PfrMetricsRec pfr_metrics_service_rec =
{
pfr_get_metrics,
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 driver interface (body). */
/* */
-/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013 by */
+/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -556,9 +556,6 @@
retval = sizeof ( type1->font_info.italic_angle );
if ( value && value_len >= retval )
*((FT_Long *)value) = type1->font_info.italic_angle;
- break;
-
- default:
break;
}