Commit c378249e58ce329f9a79522b7a272c6327894f89

Dave Arnold 2013-06-05T19:57:55

Fix more MSVC Win32 compiler warnings. * src/base/ftobjs.c: Fix typo in MS pragma. * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property): `lineno' is only used in debug mode. * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in debug mode.

diff --git a/ChangeLog b/ChangeLog
index 7ffd4d2..3fdac98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-06-05  Dave Arnold  <darnold@adobe.com>
+
+	Fix more MSVC Win32 compiler warnings.
+
+	* src/base/ftobjs.c: Fix typo in MS pragma.
+
+	* src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
+	`lineno' is only used in debug mode.
+
+	* src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
+	debug mode.
+
 2013-06-05  Werner Lemberg  <wl@gnu.org>
 
 	Fix compiler warnings.
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index fa204b6..b1fd844 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -60,7 +60,7 @@
 #undef free
 
 #if defined( _MSC_VER )
-#pragma warning( enable : 4244 )
+#pragma warning( default : 4244 )
 #endif
 
 #endif /* FT_DEBUG_LEVEL_TRACE */
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index b02d643..c804f63 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1170,6 +1170,8 @@
     FT_Memory    memory;
     FT_Error     error = FT_Err_Ok;
 
+    FT_UNUSED( lineno );        /* only used in debug mode */
+
 
     if ( font == 0 || font->name == 0 || font->name[0] == 0 )
     {
@@ -1303,6 +1305,8 @@
     FT_Memory       memory = font->memory;
     FT_Error        error  = FT_Err_Ok;
 
+    FT_UNUSED( lineno );        /* only used in debug mode */
+
 
     /* First, check whether the property already exists in the font. */
     if ( ( hn = hash_lookup( name, (hashtable *)font->internal ) ) != 0 )
diff --git a/src/cff/cf2ft.c b/src/cff/cf2ft.c
index 9b6087f..717e9ea 100644
--- a/src/cff/cf2ft.c
+++ b/src/cff/cf2ft.c
@@ -122,6 +122,8 @@
     CF2_Outline   outline = (CF2_Outline)callbacks;
     CFF_Builder*  builder;
 
+    (void)params;        /* only used in debug mode */
+
 
     FT_ASSERT( outline && outline->decoder );
     FT_ASSERT( params->op == CF2_PathOpMoveTo );