Commit 248aa63973094c1f635a1290ab4575fcb213408b

suzuki toshiya 2011-06-14T23:47:21

[gxvalid] Preparation to fix gcc4.6 compiler warnings. * src/gxvalid/gxvcommn.h (GXV_LOAD_TRACE_VARS): New macro to conditionalize the variable which is only used for trace messages. Automatically set by FT_DEBUG_LEVEL_TRACE. (GXV_LOAD_UNUSED_VARS): New macro to conditionalize the loading of unvalidated variables. Undefined by default to calm gcc4.6 warning. (GXV_ValidatorRec.{min_gid,max_gid}): New variables to hold defined GID ranges, for the comparison of GID ranges in different subtables.

diff --git a/ChangeLog b/ChangeLog
index 269d575..ddb43ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+	[gxvalid] Preparation to fix gcc4.6 compiler warnings.
+
+	* src/gxvalid/gxvcommn.h (GXV_LOAD_TRACE_VARS): New macro to
+	conditionalize the variable which is only used for trace messages.
+	Automatically set by FT_DEBUG_LEVEL_TRACE.
+	(GXV_LOAD_UNUSED_VARS): New macro to conditionalize the loading of
+	unvalidated variables.  Undefined by default to calm gcc4.6 warning.
+	(GXV_ValidatorRec.{min_gid,max_gid}): New variables to hold defined
+	GID ranges, for the comparison of GID ranges in different subtables.
+
 2011-06-08  Werner Lemberg  <wl@gnu.org>
 
 	[autofit] Remove unused structure member.
diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h
index 404c07f..7dee792 100644
--- a/src/gxvalid/gxvcommn.h
+++ b/src/gxvalid/gxvcommn.h
@@ -51,6 +51,17 @@
 FT_BEGIN_HEADER
 
 
+  /* some variables are not evaluated or only used in trace */
+
+#ifdef  FT_DEBUG_LEVEL_TRACE
+#define GXV_LOAD_TRACE_VARS
+#else
+#undef  GXV_LOAD_TRACE_VARS
+#endif
+
+#undef GXV_LOAD_UNUSED_VARS /* debug purpose */
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*****                                                               *****/
@@ -234,6 +245,9 @@ FT_BEGIN_HEADER
     GXV_Lookup_Fmt4_Transit_Func    lookupfmt4_trans;
     FT_Bytes                        lookuptbl_head;
 
+    FT_UShort  min_gid;
+    FT_UShort  max_gid;
+
     GXV_StateTable_ValidatorRec     statetable;
     GXV_XStateTable_ValidatorRec    xstatetable;