From 6b22cc4ae074276eb0adca4c7a7a0b99cc6ca56b Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Sat, 30 Jun 2018 21:23:21 +1000 Subject: connect engine: GetStringUTFChars takes pointer arg Avoids compile errors of the form: /storage/connect/jdbconn.cpp:1473:41: error: cannot initialize a parameter of type 'jboolean *' (aka 'unsigned char *') with an rvalue of type 'jboolean' (aka 'unsigned char') name = env->GetStringUTFChars(label, (jboolean)false); ^~~~~~~~~~~~~~~ /usr/lib/jvm/java-8-oracle/include/jni.h:1616:58: note: passing argument to parameter 'isCopy' here const char* GetStringUTFChars(jstring str, jboolean *isCopy) { --- storage/connect/javaconn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'storage/connect/javaconn.cpp') diff --git a/storage/connect/javaconn.cpp b/storage/connect/javaconn.cpp index d1be0ca1848..e73149486a8 100644 --- a/storage/connect/javaconn.cpp +++ b/storage/connect/javaconn.cpp @@ -153,7 +153,7 @@ bool JAVAConn::Check(jint rc) if (exc != nullptr && tid != nullptr) { jstring s = (jstring)env->CallObjectMethod(exc, tid); - const char *utf = env->GetStringUTFChars(s, (jboolean)false); + const char *utf = env->GetStringUTFChars(s, NULL); env->DeleteLocalRef(s); Msg = PlugDup(m_G, utf); } else @@ -162,7 +162,7 @@ bool JAVAConn::Check(jint rc) env->ExceptionClear(); } else if (rc < 0) { s = (jstring)env->CallObjectMethod(job, errid); - Msg = (char*)env->GetStringUTFChars(s, (jboolean)false); + Msg = (char*)env->GetStringUTFChars(s, NULL); } else Msg = NULL; -- cgit v1.2.1