[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] RFR: 8211962: Implicit narrowing in MacOSX java.desktop jsound
From: Krishna Addepalli <krishna.addepalli () oracle ! com>
Date: 2018-10-11 13:38:46
Message-ID: 585042e6-7292-4fde-9f9c-5bb05dbfe279 () default
[Download RAW message or body]
Hi Kim,
An alternative way to fix it would be to declare the loop variable itself as \
unsigned, since the channels can never be negative, but that would require you to \
cast to int in two places. Also, when casting, it is better to use \
static_cast<unsigned>, rather than C style casting.
Thanks,
Krishna
-----Original Message-----
From: Brian Burkhalter
Sent: Wednesday, October 10, 2018 4:53 AM
To: Kim Barrett <kim.barrett@oracle.com>; 2d-dev <2d-dev@openjdk.java.net>
Cc: Java Core Libs <core-libs-dev@openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] RFR: 8211962: Implicit narrowing in MacOSX java.desktop \
jsound
Looping in 2d-dev.
> On Oct 9, 2018, at 4:17 PM, Kim Barrett <kim.barrett@oracle.com> wrote:
>
> [I'm not sure whether core-libs is the right list for java.desktop
> changes.]
>
> Please review this trivial fix of a build failure on MacOSX when
> compiling with C++11/14 enabled. An int value is being used in an
> initializer where an unsigned int is needed, which is not permitted
> since C++11. The solution taken is to cast the value in the
> initializer. A "better" solution would be to change the type of the
> value, but that has substantial fannout because there are many places
> in our code where signed ints were used instead of the unsigned ints
> used by the underlying MacOSX framework.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8211962
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8211962/open.00/
>
> Testing:
> mach5 tier1 on MacOSX (really just verifying it builds).
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic