summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-25 12:36:49 +0200
committerSven Gothel <[email protected]>2014-06-25 12:36:49 +0200
commit41ce139251fb63c9b969228d11246281de547793 (patch)
tree4888ff111a6d5c1db17b928c7470cb8e1572a9e2 /src/java/com/jogamp/gluegen
parent8f571b2c0008df1b6554fa8fa754440c0f024052 (diff)
CMethodBindingEmitter: Suppress compiler warning in NewDirectByteBuffer usage (cast to void*)
Diffstat (limited to 'src/java/com/jogamp/gluegen')
-rw-r--r--src/java/com/jogamp/gluegen/CMethodBindingEmitter.java4
1 files changed, 2 insertions, 2 deletions
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()) {