diff -u x1/pdfdev.c x2/pdfdev.c
--- x1/pdfdev.c	Sun Jul 20 07:23:50 2014
+++ x2/pdfdev.c	Sun Jul 20 07:25:36 2014
@@ -1480,7 +1480,9 @@
   int              i;
   fontmap_rec     *mrec;
   struct dev_font *font;
-
+#ifdef XETEX
+  FT_Face face;
+#endif
   if (!font_name)
     return  -1;
 
@@ -1555,7 +1557,7 @@
   font->ft_to_gid  = pdf_get_font_ft_to_gid(font->font_id);
 
   font->is_cid_keyed = 0;
-  FT_Face face = pdf_font_get_ft_face(pdf_get_font(font->font_id));
+  face = pdf_font_get_ft_face(pdf_get_font(font->font_id));
   FT_Get_CID_Is_Internally_CID_Keyed(face, &font->is_cid_keyed);
 #endif
 
diff -u x1/tt_cmap.c x2/tt_cmap.c
--- x1/tt_cmap.c	Sun Jul 20 07:24:04 2014
+++ x2/tt_cmap.c	Sun Jul 20 07:25:44 2014
@@ -999,9 +999,10 @@
 	       map->idDelta[i]) & 0xffff;
       }
       if (is_used_char2(used_glyphs_copy, gid)) {
-	count++;
+        unsigned int cid;
+        count++;
 
-        unsigned int cid = gid_to_cid(sfont, gid);
+        cid = gid_to_cid(sfont, gid);
         wbuf[0] = (cid >> 8) & 0xff;
         wbuf[1] = (cid & 0xff);
 
@@ -1072,8 +1073,9 @@
       d   = ch - map->groups[i].startCharCode;
       gid = (USHORT) ((map->groups[i].startGlyphID + d) & 0xffff);
       if (is_used_char2(used_glyphs_copy, gid)) {
+        unsigned int cid;
         count++;
-        unsigned int cid = gid_to_cid(sfont, gid);
+        cid = gid_to_cid(sfont, gid);
         wbuf[0] = (cid >> 8) & 0xff;
         wbuf[1] = (cid & 0xff);
         len = UC_sput_UTF16BE((long)ch, &p, wbuf+WBUF_SIZE);
diff -u x1/type0.c x2/type0.c
--- x1/type0.c	Sun Jul 20 07:24:26 2014
+++ x2/type0.c	Sun Jul 20 07:25:54 2014
@@ -535,10 +535,14 @@
      * Need used_chars to write W, W2.
      */
     if ((parent_id = CIDFont_get_parent_id(cidfont, wmode ? 0 : 1)) < 0) {
+#ifdef XETEX
+      FT_Face face;
+      FT_Bool is_cid_keyed;
+#endif
       font->used_chars = new_used_chars2();
 #ifdef XETEX
-      FT_Face face = CIDFont_get_ft_face(cidfont);
-      FT_Bool is_cid_keyed = 0;
+      face = CIDFont_get_ft_face(cidfont);
+      is_cid_keyed = 0;
       FT_Get_CID_Is_Internally_CID_Keyed(face, &is_cid_keyed);
       if (is_cid_keyed)
         font->used_glyphs = new_used_chars2();
