Bug 26756 - dssi support doesn't compile with --enable-Werror
Summary: dssi support doesn't compile with --enable-Werror
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: 0.93
Assignee: Dalibor Topic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-19 12:25 UTC by Michael Koch
Modified: 2006-11-27 14:59 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
patch disabling -Werror for midi-dssl code using dlsym (673 bytes, patch)
2006-11-26 19:54 UTC, Dalibor Topic
Details | Diff
warning fix without removing Werror (376 bytes, patch)
2006-11-26 20:26 UTC, Dalibor Topic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Koch 2006-03-19 12:25:03 UTC
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
Comment 1 Tom Tromey 2006-04-06 22:18:03 UTC
This warning is a little bogus since dlsym is defined
to return void*, and there's nothing we can do about that.
Comment 2 Dalibor Topic 2006-11-26 19:54:29 UTC
Created attachment 12694 [details]
patch disabling -Werror for midi-dssl code using dlsym

tested on x86-linux, fixes the build there.
Comment 3 Dalibor Topic 2006-11-26 19:58:22 UTC
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. ;)
Comment 4 Mark Wielaard 2006-11-26 20:09:19 UTC
Looks good.
I assume keeping ERROR_CFLAGS, but dropping STRICT_WARNING_CFLAGS is not an option?
Comment 5 Dalibor Topic 2006-11-26 20:26:45 UTC
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.
Comment 6 Dalibor Topic 2006-11-27 14:59:20 UTC
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.