RFR 8027059: (sctp) fatal warnings overly restrictive with gcc 4.8.1

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Oct 23 09:12:43 UTC 2013


Just to be clear: looks good to me, too.

/Magnus

23 okt 2013 kl. 11:00 skrev Chris Hegarty <chris.hegarty at oracle.com>:

> On 23/10/2013 09:15, Erik Joelsson wrote:
>> I approve the change.
> 
> Thanks Erik.
> 
>> Perhaps a one line comment explaining why this exception is needed is
>> warranted?
> 
> To close the review loop, the final change will look like:
> 
> diff --git a/makefiles/lib/NioLibraries.gmk b/makefiles/lib/NioLibraries.gmk
> --- a/makefiles/lib/NioLibraries.gmk
> +++ b/makefiles/lib/NioLibraries.gmk
> @@ -150,7 +150,8 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
> 
>   ifneq ($(OPENJDK_TARGET_OS), macosx)
> 
> -    SCTP_WERROR := -Werror
> +    # Suppress unused parameters required by exported JNI functions.
> +    SCTP_WERROR := -Werror -Wno-error=unused-parameter
>     ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
>       SCTP_WERROR :=
>     endif
> 
> 
> -Chris.
> 
>> 
>> /Erik
>> 
>> On 2013-10-22 20:44, Chris Hegarty wrote:
>>> The SCTP native code complies with -Werror. gcc 4.8.1 reports unused
>>> parameters as warnings, and this causes the build to fail. gcc 4.8.1
>>> is the defaul on Ubuntu 13.10.
>>> 
>>> These parameters are required as the functions are JNI functions. The
>>> simplest solution is to ignore/suppress these unused param warnings.
>>> 
>>> See discussion on:
>>> http://mail.openjdk.java.net/pipermail/build-dev/2013-July/009513.html
>>> 
>>> diff --git a/makefiles/lib/NioLibraries.gmk
>>> b/makefiles/lib/NioLibraries.gmk
>>> --- a/makefiles/lib/NioLibraries.gmk
>>> +++ b/makefiles/lib/NioLibraries.gmk
>>> @@ -150,7 +150,7 @@
>>> 
>>> ifneq ($(OPENJDK_TARGET_OS), macosx)
>>> 
>>> - SCTP_WERROR := -Werror
>>> + SCTP_WERROR := -Werror -Wno-error=unused-parameter
>>> ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
>>> SCTP_WERROR :=
>>> endif
>>> 
>>> With this change it may be possible to remove the special casing of
>>> ppc? I would need to check, but this could be handled separately.
>>> 
>>> -Chris.
>> 



More information about the build-dev mailing list