--- a/jdk/src/java.desktop/unix/native/common/awt/CUPSfuncs.c Thu Jun 02 15:36:15 2016 +0300
+++ b/jdk/src/java.desktop/unix/native/common/awt/CUPSfuncs.c Fri Jun 03 11:37:45 2016 +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.