[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8310906: Fix -Wconversion warnings in runtime, oops and some code header files. [v4]
From:       Coleen Phillimore <coleenp () openjdk ! org>
Date:       2023-06-28 19:48:30
Message-ID: dWSDDlxc7G48eu3CBl4OMQod2CXOfc87eU6pZ1276Yg=.259f7720-6a3f-491c-8b45-fe55f505d8e7 () github ! com
[Download RAW message or body]

On Wed, 28 Jun 2023 16:15:39 GMT, Ioi Lam <iklam@openjdk.org> wrote:

> > Coleen Phillimore has updated the pull request incrementally with one additional \
> > commit since the last revision: 
> > Use pointer_delta_as_int for the name that uses pointer_delta, fix negative case \
> > to just do checked_cast.
> 
> src/hotspot/share/utilities/globalDefinitions.hpp line 529:
> 
> > 527: template <typename T>
> > 528: inline int pointer_delta_as_int(const volatile T* left, const volatile T* \
> >                 right) {
> > 529:   return checked_cast<int>(pointer_delta(left, right, sizeof(T)));
> 
> For clarity, I think you should add a comment saying the returned value is always \
> non-negative.

done, thanks!

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14675#discussion_r1245681394


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic