Gluegen's native binding code causes two kinds of compiler warning for JOCL. Type 1: The line int * _offsetHandle = NULL; gives an "unused variable" warning for _offsetHandle if the argument type isn't an NIO buffer array. This can probably be fixed by putting if(type.isNIOBufferArray()) in CMethodBindingEmitter.emitBodyVariableDeclarations(). Type 2: The clCreateProgramWithBinary() function in cl.h has an argument of type "const unsigned char **". Gluegen generates code that declares the body variable as "char * *" and casts it to "const char * *", which gives an incompatible pointer type warning. This looks like it requires a fix in CMethodBindingEmitter as well, but the fix may be more involved since the code currently seems unaware of "unsigned".
A fix for both of these is in https://github.com/sgothel/gluegen/pull/19. It includes a new unit test for C functions with a parameter of type "unsigned char **".