jdk/src/java.desktop/windows/native/libfontmanager/fontpath.c
changeset 40423 6b56a2890514
parent 39874 bf85c2b8f0e0
--- a/jdk/src/java.desktop/windows/native/libfontmanager/fontpath.c	Wed Aug 03 17:01:51 2016 -0700
+++ b/jdk/src/java.desktop/windows/native/libfontmanager/fontpath.c	Thu Aug 04 15:58:28 2016 +0200
@@ -263,6 +263,7 @@
     jstring familyLC;
     size_t slen;
     LOGFONTW lfw;
+    jboolean mapHasKey;
 
     /* Exceptions indicate critical errors such that program cannot continue
      * with further execution. Henceforth, the function returns immediately
@@ -311,10 +312,10 @@
     }
 
     /* check if already seen this family with a different charset */
-    jboolean mapHasKey = (*env)->CallBooleanMethod(env,
-                                                   fmi->familyToFontListMap,
-                                                   fmi->containsKeyMID,
-                                                   familyLC);
+    mapHasKey = (*env)->CallBooleanMethod(env,
+                                          fmi->familyToFontListMap,
+                                          fmi->containsKeyMID,
+                                          familyLC);
     if ((*env)->ExceptionCheck(env)) {
         /* Delete the created references before return */
         DeleteLocalReference(env, fmi->family);
@@ -535,6 +536,7 @@
     jclass classIDString;
     jmethodID putMID;
     GdiFontMapInfo fmi;
+    LOGFONTW lfw;
 
     /* Check we were passed all the maps we need, and do lookup of
      * methods for JNI up-calls
@@ -598,7 +600,6 @@
     }
 
     /* Enumerate fonts via GDI to build maps of fonts and families */
-    LOGFONTW lfw;
     memset(&lfw, 0, sizeof(lfw));
     lfw.lfCharSet = DEFAULT_CHARSET;  /* all charsets */
     wcscpy(lfw.lfFaceName, L"");      /* one face per family (CHECK) */