When compiling classpath CVS with dssi support and --enable-Werror the build fails with the following error message: gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -I../../../include -I../../../native/jni/classpath -I../../../native/target/Linux -I../../../native/target/generic -pedantic -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -Werror -g -O2 -MT gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.lo -MD -MP -MF .deps/gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.Tpo -c gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.c -fPIC -DPIC -o .libs/gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.o cc1: warnings being treated as errors gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.c: In function 'Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_dlopen_1': gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.c:70: warning: ISO C forbids conversion of object pointer to function pointer type make[3]: *** [gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.lo] Error 1
This warning is a little bogus since dlsym is defined to return void*, and there's nothing we can do about that.
Created attachment 12694 [details] patch disabling -Werror for midi-dssl code using dlsym tested on x86-linux, fixes the build there.
ChangeLog: 2006-11-26 Dalibor Topic <robilad@kaffe.org> * native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider.c (Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_dlopen_1): Added comment to explain the inavoidable warning. * native/jni/midi-dssi/Makefile.am (AM_CFLAGS): Removed ERROR_CFLAGS since it caused the build to fail on Linux. for some reason, the BugZilla thing does not let me assign the bug to myself, so someone please sort that out. ;)
Looks good. I assume keeping ERROR_CFLAGS, but dropping STRICT_WARNING_CFLAGS is not an option?
Created attachment 12695 [details] warning fix without removing Werror 2006-11-26 Dalibor Topic <robilad@kaffe.org> Fixes bug #26756. * native/jni/midi-dssi/Makefile.am (AM_CFLAGS): Removed STRICT_WARNING_CFLAGS since it caused the build to fail on GNU/Linux.
Checked in the patch with the fllowing ChangeLog: 2006-11-26 Dalibor Topic <robilad@kaffe.org> Fixes bug #26756. * native/jni/midi-dssi/Makefile.am (AM_CFLAGS): Removed STRICT_WARNING_CFLAGS since it caused the build to fail on GNU/Linux.