* src/base/ftobjs.c (FT_Open_Face): don't call FT_New_GlyphSlot and FT_New_Size if we're opening a face with face_index < 0 (which is only used for testing the format). * src/gxvalid/gxvmort0.c: removed compiler warning
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
diff --git a/ChangeLog b/ChangeLog
index c3e3e58..765e9bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-10-17 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (FT_Open_Face): don't call FT_New_GlyphSlot and
+ FT_New_Size if we're opening a face with face_index < 0 (which is only
+ used for testing the format).
+
+ * src/gxvalid/gxvmort0.c: removed compiler warning
+
2005-10-16 David Turner <david@freetype.org>
* src/tools/apinames.c: adding new tool to extract public API
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index b36a222..471b3ab 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1716,22 +1716,25 @@
/* now allocate a glyph slot object for the face */
FT_TRACE4(( "FT_Open_Face: Creating glyph slot\n" ));
- error = FT_New_GlyphSlot( face, NULL );
- if ( error )
- goto Fail;
-
- /* finally, allocate a size object for the face */
+ if ( face_index >= 0 )
{
- FT_Size size;
+ error = FT_New_GlyphSlot( face, NULL );
+ if ( error )
+ goto Fail;
+
+ /* finally, allocate a size object for the face */
+ {
+ FT_Size size;
- FT_TRACE4(( "FT_Open_Face: Creating size object\n" ));
+ FT_TRACE4(( "FT_Open_Face: Creating size object\n" ));
- error = FT_New_Size( face, &size );
- if ( error )
- goto Fail;
+ error = FT_New_Size( face, &size );
+ if ( error )
+ goto Fail;
- face->size = size;
+ face->size = size;
+ }
}
/* initialize internal face data */
diff --git a/src/gxvalid/gxvmort0.c b/src/gxvalid/gxvmort0.c
index bb04589..0902056 100644
--- a/src/gxvalid/gxvmort0.c
+++ b/src/gxvalid/gxvmort0.c
@@ -73,7 +73,7 @@
FT_UShort dontAdvance;
FT_UShort markLast;
FT_UShort reserved;
- FT_UShort verb;
+ FT_UShort verb = 0;
FT_UNUSED( state );
FT_UNUSED( table );