--- old/make/lib/Awt2dLibraries.gmk 2016-04-20 12:21:36.165236440 +0530 +++ new/make/lib/Awt2dLibraries.gmk 2016-04-20 12:21:35.973236440 +0530 @@ -587,9 +587,7 @@ $(CUPS_CFLAGS) \ $(X_CFLAGS) \ $(LIBAWT_HEADLESS_CFLAGS), \ - DISABLED_WARNINGS_gcc := maybe-uninitialized int-to-pointer-cast, \ - DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \ - E_EMPTY_TRANSLATION_UNIT, \ + DISABLED_WARNINGS_solstudio := E_EMPTY_TRANSLATION_UNIT, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ --- old/src/java.desktop/unix/native/common/awt/fontpath.c 2016-04-20 12:21:36.737236440 +0530 +++ new/src/java.desktop/unix/native/common/awt/fontpath.c 2016-04-20 12:21:36.541236440 +0530 @@ -1012,17 +1012,20 @@ jfieldID familyNameID, styleNameID, fullNameID, fontFileID; jmethodID fcFontCons; char* debugMinGlyphsStr = getenv("J2D_DEBUG_MIN_GLYPHS"); + jclass fcInfoClass; + jclass fcCompFontClass; + jclass fcFontClass; CHECK_NULL(fcInfoObj); CHECK_NULL(fcCompFontArray); - jclass fcInfoClass = + fcInfoClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigInfo"); CHECK_NULL(fcInfoClass); - jclass fcCompFontClass = + fcCompFontClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FcCompFont"); CHECK_NULL(fcCompFontClass); - jclass fcFontClass = + fcFontClass = (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigFont"); CHECK_NULL(fcFontClass); @@ -1146,7 +1149,8 @@ int fn, j, fontCount, nfonts; unsigned int minGlyphs; FcChar8 **family, **styleStr, **fullname, **file; - jarray fcFontArr; + jarray fcFontArr = NULL; + FcCharSet *unionCharset = NULL; fcCompFontObj = (*env)->GetObjectArrayElement(env, fcCompFontArray, i); fcNameStr = @@ -1218,7 +1222,7 @@ minGlyphs = val; } } - FcCharSet *unionCharset = NULL; + for (j=0; jfonts[j]; FcChar8 *fontformat; --- old/src/java.desktop/unix/native/common/awt/CUPSfuncs.c 2016-04-20 12:21:37.305236440 +0530 +++ new/src/java.desktop/unix/native/common/awt/CUPSfuncs.c 2016-04-20 12:21:37.109236440 +0530 @@ -371,6 +371,10 @@ ppd_option_t *option; ppd_choice_t *choice; ppd_size_t *size; + const char *filename = NULL; + int i; + jobjectArray sizeArray = NULL; + jfloat *dims; const char *name = (*env)->GetStringUTFChars(env, printer, NULL); if (name == NULL) { @@ -378,10 +382,6 @@ JNU_ThrowOutOfMemoryError(env, "Could not create printer name"); return NULL; } - const char *filename; - int i; - jobjectArray sizeArray = NULL; - jfloat *dims; // NOTE: cupsGetPPD returns a pointer to a filename of a temporary file. // unlink() must be called to remove the file after using it. @@ -470,6 +470,8 @@ jclass intCls, cls; jmethodID intCtr, arrListAddMID; int i; + const char *name = NULL; + const char *filename = NULL; intCls = (*env)->FindClass(env, "java/lang/Integer"); CHECK_NULL(intCls); @@ -481,13 +483,13 @@ (*env)->GetMethodID(env, cls, "add", "(Ljava/lang/Object;)Z"); CHECK_NULL(arrListAddMID); - const char *name = (*env)->GetStringUTFChars(env, printer, NULL); + name = (*env)->GetStringUTFChars(env, printer, NULL); if (name == NULL) { (*env)->ExceptionClear(env); JNU_ThrowOutOfMemoryError(env, "Could not create printer name"); return; } - const char *filename; + // NOTE: cupsGetPPD returns a pointer to a filename of a temporary file. // unlink() must be called to remove the file after using it.