<AWT Dev> Review request for JDK-8157476 -Wlogical-not-parentheses warnings in JRSUIConstantSync.m

Dan Smith daniel.smith at oracle.com
Tue May 31 18:35:53 UTC 2016


Can I get somebody to look at this?  Just point me in the right direction if I'm in the wrong place, please.

—Dan

> On May 20, 2016, at 1:52 PM, Dan Smith <daniel.smith at oracle.com> wrote:
> 
> https://bugs.openjdk.java.net/browse/JDK-8157476
> 
> I noticed this code triggering a LOT of warnings when building under Xcode 7.3 in Mac OS X, and the fix is trivial.
> 
> (I'm guessing this native file belongs to AWT, but please redirect me if I'm wrong.)
> 
> -----
> 
> diff -r 8c75ff8185c6 src/java.desktop/macosx/native/libosxui/JRSUIConstantSync.m
> --- a/src/java.desktop/macosx/native/libosxui/JRSUIConstantSync.m	Fri May 20 11:12:02 2016 -0700
> +++ b/src/java.desktop/macosx/native/libosxui/JRSUIConstantSync.m	Fri May 20 13:41:53 2016 -0600
> @@ -90,7 +90,7 @@
>     apple_laf_JRSUIConstants_ ## clazz ## __ ## constant
> 
> #define CONSTANT_CHECK(clazz, constant)                                \
> -    JRS_CONSTANT(clazz, constant) == JNI_CONSTANT(clazz, constant)
> +    ( JRS_CONSTANT(clazz, constant) == JNI_CONSTANT(clazz, constant) )
> 
> #define CONSISTENCY_CHECK(clazz, constant)                            \
>     if ( !CONSTANT_CHECK(clazz, constant) ) return NO;
> 
> -----
> 
> If that looks okay, I'm happy to push this myself.  As noted in the bug comments, I think this is a legitimate bug fix, though -- so if somebody wants to write a test exposing the bug, you may just want to assign to yourself and take responsibility for pushing.
> 
> Thanks,
> Dan



More information about the awt-dev mailing list