8309692: Fix -Wconversion warnings in javaClasses#14397
8309692: Fix -Wconversion warnings in javaClasses#14397coleenp wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
|
@coleenp This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 90 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
Thanks Fred. I think you agree it's trivial? |
matias9927
left a comment
There was a problem hiding this comment.
Looks good! Seems trivial as well
|
Yes, it is trivial. |
|
Thanks Fred and Matias! |
|
Going to push as commit beec734.
Your commit was automatically rebased without conflicts. |
| "(0.0 means off)") \ | ||
| range(0.0, (double)max_intx) \ | ||
| \ | ||
| product(intx, MaxJavaStackTraceDepth, 1024, \ |
There was a problem hiding this comment.
Seems unrelated to the described issue.
There was a problem hiding this comment.
This accounted for 2 warnings in javaClasses.cpp.
| assert((jushort)bci == bci, "bci should be short"); | ||
| return build_int_from_shorts(version, bci); | ||
| assert((u2)bci == bci, "bci should be short"); | ||
| return build_int_from_shorts((u2)version, (u2)bci); |
There was a problem hiding this comment.
How about instead, something like
return build_int_from_shorts((u2)version, checked_cast<u2>(bci));
I guess that loses the explicit message, but seems otherwise clearer to me.
| return build_int_from_shorts(cpref, mid); | ||
| assert((u2)mid == mid, "mid should be short"); | ||
| assert((u2)cpref == cpref, "cpref should be short"); | ||
| return build_int_from_shorts((u2)cpref, (u2)mid); |
There was a problem hiding this comment.
Similarly here, could use
return build_int_from_shorts(checked_cast<u2>(cpref), checked_cast<u2>(mid));
|
Oh well, I didn't notice this had already been integrated. |
Please review this trivial patch to remove implicit integer conversions in javaClasses.inline.hpp/cpp files.
Tested tier1-4.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14397/head:pull/14397$ git checkout pull/14397Update a local copy of the PR:
$ git checkout pull/14397$ git pull https://git.openjdk.org/jdk.git pull/14397/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14397View PR using the GUI difftool:
$ git pr show -t 14397Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14397.diff
Webrev
Link to Webrev Comment