----- Original Message ----- > On 03/14/2013 08:58 AM, Alan Bateman wrote: > > On 14/03/2013 01:26, David Holmes wrote: > >> : > >> > >>> 3. -Werror is set for the SCTP native code causing the build to > >>> fail: > >>> > >>> Lots of stuff like: > >>> > >>> /home/andrew/projects/openjdk/upstream/jdk8/jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c:88:24: > >>> error: unused parameter 'klass' [-Werror=unused-parameter] > >>> > >>> as -Werror is passed and -Wno-unused doesn't seem to turn these > >>> off. > >>> SCTP_WERROR= > >>> worked around it (perhaps this should at least be > >>> WARNINGS_ARE_ERRORS > >>> to match HotSpot?) > >>> > >>> Do we have a preferred way to fix these errors? I know about > >>> __unused__ but I believe this > >>> is GCC-specific and I wouldn't want to break the build on other > >>> platforms (Solaris, MacOS X, BSD). > >> > >> What gcc version are you using? I don't see this with 4.6. > >> > >> Probably best to take this up with nio-dev folk. > > I'm using 4.6.3 and don't see it either. In any case, this is SCTP > > so > > net-dev is the best place to review a patch to it (but it doesn't > > matter, the right people will see it either way). > > I've not seen issues with SCTP compiles either. That said, the SCTP > native code should be clean, where possible, from all warnings ( > unless > something has changed recently ). > > >>> > /home/andrew/projects/openjdk/upstream/jdk8/jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c:88:24: > > >>> error: unused parameter 'klass' [-Werror=unused-parameter] > > The above specific warning cannot be fixed in the code as the unused > parameter is part of the JNI method declaration. If these are the > only > type of warnings in this area, and they cause the build to fail, then > it > is a build issue and not a source one. > > -Chris. > > > > > -Alan >
The general issue, and one I've pointed out for HotSpot before, is don't turn on -Werror for everyone. It inevitably breaks someone's build somewhere at sometime. I believe you can use __unused__ on the parameters, but that's probably GCC-specific. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07