From 41ce139251fb63c9b969228d11246281de547793 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 25 Jun 2014 12:36:49 +0200 Subject: CMethodBindingEmitter: Suppress compiler warning in NewDirectByteBuffer usage (cast to void*) --- src/java/com/jogamp/gluegen/CMethodBindingEmitter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/java/com/jogamp/gluegen/CMethodBindingEmitter.java') diff --git a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java index 1c9d043..810046b 100644 --- a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java +++ b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java @@ -1025,7 +1025,7 @@ public class CMethodBindingEmitter extends FunctionEmitter { writer.println(" return JVMUtil_NewDirectByteBufferCopy(env, &_res, "+returnSizeOf+");"); } else if (javaReturnType.isNIOBuffer() || javaReturnType.isCompoundTypeWrapper()) { writer.println(" if (NULL == _res) return NULL;"); - writer.print(" return (*env)->NewDirectByteBuffer(env, _res, "); + writer.print(" return (*env)->NewDirectByteBuffer(env, (void *)_res, "); // See whether capacity has been specified if (returnValueCapacityExpression != null) { @@ -1071,7 +1071,7 @@ public class CMethodBindingEmitter extends FunctionEmitter { pointerType = retType.asArray().getBaseElementType(); } writer.println(" (*env)->SetObjectArrayElement(env, " + arrayRes + ", " + arrayIdx + - ", (*env)->NewDirectByteBuffer(env, _res[" + arrayIdx + "], sizeof(" + pointerType.getName() + ")));"); + ", (*env)->NewDirectByteBuffer(env, (void *)_res[" + arrayIdx + "], sizeof(" + pointerType.getName() + ")));"); writer.println(" }"); writer.println(" return " + arrayRes + ";"); } else if (javaReturnType.isArray()) { -- cgit v1.2.3