changeset 186:356143d30b10

8130345: Dev repo build failure Summary: Fixed build Reviewed-by: alkonsta
author snazarki
date Thu, 02 Jul 2015 21:48:29 +0400
parents 3185db9d38e2
children 6bb6fcb424ce
files src/se/native/com/oracle/dio/uart/impl/jni_uart.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/native/com/oracle/dio/uart/impl/jni_uart.cpp	Thu Jul 02 20:37:36 2015 +0300
+++ b/src/se/native/com/oracle/dio/uart/impl/jni_uart.cpp	Thu Jul 02 21:48:29 2015 +0400
@@ -562,6 +562,7 @@
  */
 JNIEXPORT void JNICALL Java_com_oracle_dio_uart_impl_UARTImpl_generateBreak0
   (JNIEnv* env, jobject obj, jint duration) {
+    device_reference device = INVALID_DEVICE_REFERENCE;
     javacall_dio_result result = JAVACALL_DIO_CLOSED;
 
     // Get synchronized with the object to avoid closing the handle by another
@@ -569,7 +570,7 @@
     // Do not generate ClosedDeviceException until all JNI calls are made.
     env->MonitorEnter(obj);
     if (env->ExceptionCheck() != JNI_TRUE) {
-        device_reference device = getDeviceReferenceFromDeviceObject(env, obj);
+        device = getDeviceReferenceFromDeviceObject(env, obj);
         if (device != INVALID_DEVICE_REFERENCE) {
             javacall_handle handle = getDeviceHandle(device);
             if (handle != JAVACALL_INVALID_HANDLE) {