I get serveral warnings with gcc 3.4.3 (on a PowerPC).
Any idea on how to modify the code to remove them?
Code: Select all
gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include -I./include -I./inlinability -Iinlinability -DBOOT_CLASS_PATH=\"/home/david/local/staging/share/sablevm-classpath:/home/david/local/staging/share/sablevm-classpath/libclasspath.jar:/home/david/local/staging/share/sablevm-classpath/resources.jar\" -DBOOT_LIBRARY_PATH=\"/home/david/local/staging/lib/sablevm-classpath\" -g -O2 -Wall -fno-gcse -fno-strict-aliasing -std=iso9899:1990 -pedantic -Werror -O0 -W -fno-builtin -Wshadow -Wpointer-arith -Wbad-function-cast -Wundef -Wcast-align -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-long-long -MT libsablevm.lo -MD -MP -MF .deps/libsablevm.Tpo -c libsablevm.c -fPIC -DPIC -o .libs/libsablevm.o
In file included from libsablevm.c:103:
native.c: In function `_svmf_bind_native_method':
native.c:607: warning: ISO C forbids conversion of object pointer to function pointer type
native.c:617: warning: ISO C forbids conversion of object pointer to function pointer type
In file included from invoke_interface.c:187,
from libsablevm.c:116:
vm_args.c: In function `JNI_CreateJavaVM':
vm_args.c:6: warning: ISO C forbids conversion of object pointer to function pointer type
vm_args.c:15: warning: ISO C forbids conversion of object pointer to function pointer type
vm_args.c:24: warning: ISO C forbids conversion of object pointer to function pointer type
In file included from libsablevm.c:120:
java_lang_VMRuntime.c: In function `Java_java_lang_VMRuntime_nativeLoad':
java_lang_VMRuntime.c:407: warning: ISO C forbids conversion of object pointer to function pointer type
make[5]: *** [libsablevm.lo] Error 1
This is the code that creates the warning. lt_dlsym returns a void *.
Code: Select all
method->data.native_method->code =
(void (*)(void)) lt_dlsym (native_library->handle,
method->data.native_method->
short_name);
Thanks,
iTux

